:root {
  color-scheme: light;
  --paper: #f7f7f4;
  --white: #fff;
  --ink: #111110;
  --muted: #55554f;
  --line: #d8d8d1;
  --hot: #f20a72;
  --teal: #00a99d;
  --teal-dark: #087f79;
  --display: 'Space Grotesk', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --body: 'DM Sans', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 16px; line-height: 1.6; background: var(--paper); }
a { color: inherit; }
button, textarea { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 11px 15px; color: var(--white); background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.admin-header { width: min(1240px, calc(100% - 40px)); min-height: 92px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.admin-brand { display: inline-flex; align-items: center; }
.admin-brand img { width: 156px; height: auto; }
.admin-header nav { display: flex; align-items: center; gap: 22px; }
.back-link { font-weight: 700; text-underline-offset: 3px; }
.admin-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 90px; }
.login-panel { max-width: 760px; margin: 46px auto; padding: clamp(24px, 5vw, 64px); border: 1px solid var(--line); background: var(--white); box-shadow: 9px 9px 0 var(--ink); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: #30302c; font: 700 12px/1.4 var(--display); letter-spacing: .08em; }
.eyebrow-shape { width: 12px; height: 12px; flex: 0 0 auto; background: var(--teal); transform: rotate(45deg); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 20px; font: 700 clamp(38px, 6vw, 70px)/1.03 var(--display); letter-spacing: -.055em; }
h1 em { color: var(--hot); font-style: normal; }
.intro-copy { max-width: 760px; margin: 0 0 10px; color: #41413c; font-size: 17px; line-height: 1.7; }
.intro-copy-zh { margin-bottom: 28px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border: 2px solid var(--ink); font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { color: var(--ink); background: var(--hot); }
.button-quiet { color: var(--ink); background: var(--white); }
.button:hover:not(:disabled) { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.status { min-height: 26px; margin: 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.status[data-kind="success"] { color: #075d57; }
.status[data-kind="warning"] { color: #734000; }
.status[data-kind="error"] { color: #9c1740; }
#login-status { margin-top: 18px; }
.editor-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .58fr); align-items: end; gap: 34px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.editor-heading h1 { font-size: clamp(40px, 5vw, 62px); }
.publish-note { display: flex; align-items: flex-start; gap: 13px; padding: 16px; border-left: 4px solid var(--teal); background: #e9f4f2; color: #123b38; font-size: 14px; font-weight: 600; }
.publish-dot { width: 13px; height: 13px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--hot); }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 0; }
.field-section { margin: 38px 0 48px; }
.field-section > h2 { margin-bottom: 5px; font: 700 clamp(24px, 3vw, 31px)/1.2 var(--display); }
.group-hint { margin-bottom: 18px; color: var(--muted); font-size: 15px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.content-field { min-width: 0; padding: 20px; border: 1px solid var(--line); background: var(--white); }
.field-title { margin: 0 0 16px; font: 700 17px/1.35 var(--display); }
.language-field { margin-top: 14px; }
.language-field label { display: block; margin-bottom: 7px; font-size: 15px; font-weight: 700; }
.language-field textarea { width: 100%; min-height: 112px; resize: vertical; padding: 12px; border: 1px solid #7a7a72; border-radius: 0; color: var(--ink); background: #fff; font-size: 16px; line-height: 1.55; }
.language-field textarea:focus { border-color: var(--teal-dark); }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.save-bar { position: sticky; z-index: 5; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 20px; border: 1px solid var(--ink); background: var(--paper); box-shadow: 0 -4px 16px rgba(17,17,16,.08); }
.save-hint { margin: 0; color: #41413c; font-size: 14px; }
.save-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.admin-footer { width: min(1120px, calc(100% - 40px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin: 0 auto; padding: 22px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
  .admin-header { width: calc(100% - 28px); min-height: 76px; }
  .admin-brand img { width: 128px; }
  .admin-header nav { gap: 12px; }
  .back-link { max-width: 132px; font-size: 14px; }
  .button { min-height: 46px; padding: 10px 12px; }
  .admin-shell { width: calc(100% - 28px); padding-top: 28px; }
  .login-panel { margin: 20px auto; padding: 24px 20px; box-shadow: 5px 5px 0 var(--ink); }
  .editor-heading { grid-template-columns: 1fr; gap: 10px; }
  .editor-toolbar { align-items: flex-start; flex-direction: column; }
  .field-grid { grid-template-columns: 1fr; }
  .content-field { padding: 16px; }
  .save-bar { align-items: stretch; flex-direction: column; gap: 12px; }
  .save-actions { justify-content: stretch; }
  .save-actions .button { flex: 1 1 190px; }
  .admin-footer { width: calc(100% - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
