:root {
  --forest: #042c25;
  --green: #0a5542;
  --green-2: #13745a;
  --gold: #b98b37;
  --gold-2: #f0cf75;
  --ink: #1d2d28;
  --muted: #64736e;
  --paper: #fffaf0;
  --cream: #f8f2e5;
  --line: #dcc17c;
  --danger: #8b2f21;
  --ok: #0c6b4c;
  --shadow: 0 20px 60px rgba(4, 28, 23, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(4, 44, 37, .045) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #fffaf1 0%, #fffdf8 48%, #f2ead7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    repeating-linear-gradient(90deg, rgba(8, 47, 39, .08) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(189, 145, 66, .08) 0 1px, transparent 1px 6px);
  mix-blend-mode: multiply;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  min-height: 80px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(24px, 5vw);
  background: rgba(255, 253, 247, .92);
  border-bottom: 1px solid rgba(185, 139, 55, .34);
  box-shadow: 0 12px 30px rgba(4, 44, 37, .08);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  gap: 2px;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.brand b {
  color: var(--green);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: 22px;
  letter-spacing: 0;
}

.brand small {
  margin-left: 6px;
  color: var(--gold);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 11px;
  font-weight: 900;
  vertical-align: baseline;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
}

nav a:hover {
  border-color: rgba(185, 139, 55, .46);
  background: rgba(240, 207, 117, .16);
}

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 92px max(24px, 11vw) 76px;
  background:
    linear-gradient(90deg, rgba(255, 250, 240, .98) 0%, rgba(255, 250, 240, .9) 48%, rgba(4, 44, 37, .1) 100%),
    linear-gradient(135deg, #fffaf0 0%, #f4e7c7 100%);
  border-bottom: 1px solid rgba(185, 139, 55, .32);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 34px max(18px, 4vw);
  border: 1px solid rgba(185, 139, 55, .42);
  box-shadow: inset 0 0 0 7px rgba(255, 253, 248, .72), inset 0 0 0 9px rgba(185, 139, 55, .18);
}

.hero::after {
  right: max(28px, 8vw);
  bottom: 42px;
  width: min(390px, 34vw);
  aspect-ratio: 1;
  border: 18px solid rgba(4, 44, 37, .1);
  transform: rotate(45deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1 {
  color: var(--forest);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.06;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 24px 0 34px;
  color: #394a43;
  font-size: 19px;
  line-height: 1.9;
}

.primary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(231, 200, 115, .65);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--green-2), var(--forest));
  color: white;
  padding: 14px 22px;
  box-shadow: 0 10px 24px rgba(8, 47, 39, .2);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.primary:focus,
input:focus,
select:focus,
textarea:focus,
.options button:focus {
  outline: 3px solid rgba(189, 145, 66, .35);
  outline-offset: 2px;
}

.principles,
.creator {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
  transform: translateY(-42px);
}

.principles article,
form,
.month-honor,
.dialog-panel {
  border: 1px solid rgba(189, 145, 66, .45);
  background: rgba(255, 250, 240, .88);
  box-shadow: var(--shadow);
}

.principles article {
  min-height: 188px;
  display: grid;
  align-content: start;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .96), rgba(248, 242, 229, .94)),
    var(--paper);
}

.principles b {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--gold-2);
  font-family: Georgia, serif;
  font-size: 28px;
}

.principles h2 {
  margin-top: 16px;
  color: var(--forest);
  font-size: 20px;
}

.principles p,
.section-copy p,
.fine,
.hint {
  color: var(--muted);
  line-height: 1.75;
}

.creator {
  display: grid;
  gap: 30px;
  padding: 76px 0 96px;
}

.creator-heading {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.section-copy h2 {
  color: var(--forest);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
}

.section-copy p {
  margin: 18px 0 0;
}

.creator-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 24px;
  align-items: stretch;
}

form {
  position: relative;
  overflow: hidden;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .96), rgba(248, 242, 229, .94)),
    var(--paper);
}

.certificate-form,
.inquiry-form {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--forest), var(--gold-2), var(--forest));
}

.panel-kicker {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185, 139, 55, .42);
  border-radius: 50%;
  background: #fff7df;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 900;
}

form h3 {
  margin: 16px 0 0;
  color: var(--forest);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(25px, 2.3vw, 34px);
  line-height: 1.25;
}

.panel-intro {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

label {
  display: block;
  margin: 16px 0 8px;
  color: var(--forest);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(8, 47, 39, .3);
  border-radius: 4px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.combo {
  position: relative;
}

.options {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 310px;
  overflow: auto;
  background: #fffdf8;
  border: 1px solid rgba(8, 47, 39, .28);
  box-shadow: 0 18px 40px rgba(8, 47, 39, .18);
}

.options:empty {
  display: none;
}

.options button,
.empty-option {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(216, 194, 138, .45);
  background: transparent;
  color: var(--ink);
  padding: 11px 14px;
  text-align: left;
  cursor: pointer;
}

.options button:hover {
  background: #f6ecd7;
}

.option-main {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.option-detail {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.options em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.option-aggregate {
  background: #f8efd4;
  border-left: 4px solid var(--gold);
}

.data-status {
  border: 1px solid rgba(189, 145, 66, .45);
  background: #fff7df;
  color: var(--forest);
  padding: 12px 14px;
  line-height: 1.55;
  font-size: 14px;
  font-weight: 700;
}

.data-status[data-type="ok"] {
  border-color: rgba(12, 107, 76, .35);
  background: #eef8f1;
  color: var(--ok);
}

.data-status[data-type="error"],
.data-status[data-type="warn"] {
  border-color: rgba(139, 47, 33, .28);
  background: #fff0ea;
  color: var(--danger);
}

.inquiry-form {
  background:
    linear-gradient(180deg, rgba(255, 252, 243, .98), rgba(242, 233, 211, .96)),
    var(--paper);
}

.inquiry-form label {
  font-size: 13px;
}

.certificate-form .primary,
.inquiry-form .secondary {
  width: 100%;
  margin-top: 20px;
}

.certificate-form .primary,
.inquiry-form .secondary {
  margin-top: auto;
}

.fine {
  margin-top: 12px;
}

.form-status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.form-status[data-type="error"] {
  color: var(--danger);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(189, 145, 66, .38);
  border-bottom: 1px solid rgba(189, 145, 66, .38);
}

.summary div {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: #fffdf8;
  border: 1px solid rgba(8, 47, 39, .12);
  padding: 12px;
}

.summary span {
  color: var(--muted);
  font-size: 13px;
}

.summary b {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1.1;
}

.fine,
.hint {
  margin: 8px 0 0;
  font-size: 12px;
}

.scope-note {
  min-height: 0;
  margin: 8px 0 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.leaderboards {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 86px 0 84px;
  background:
    linear-gradient(90deg, rgba(240, 207, 117, .12) 0 1px, transparent 1px 16px),
    linear-gradient(135deg, #031f1b 0%, #064235 48%, #0b2d27 100%);
  color: #fff8e6;
  border-top: 6px solid rgba(185, 139, 55, .82);
  border-bottom: 6px solid rgba(185, 139, 55, .82);
}

.leaderboards,
.leaderboard-dialog .dialog-list {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.leaderboards::before,
.leaderboards::after {
  content: "";
  position: absolute;
  left: 5vw;
  right: 5vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 207, 117, .82), transparent);
  pointer-events: none;
}

.leaderboards::before {
  top: 28px;
}

.leaderboards::after {
  bottom: 28px;
}

.leaderboards-inner {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
}

.leader-copy {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.leader-copy .eyebrow,
.leaderboards .eyebrow {
  color: var(--gold-2);
}

.leader-copy h2 {
  color: #fff8e6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .16);
}

.leader-copy p {
  color: rgba(255, 248, 230, .78);
}

.month-ranks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.month-honor {
  position: relative;
  min-height: 568px;
  overflow: hidden;
  padding: 30px 28px 28px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 252, 243, .98) 0%, rgba(244, 230, 191, .96) 100%);
  border: 2px solid rgba(240, 207, 117, .86);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, .28),
    inset 0 0 0 8px rgba(255, 255, 255, .56),
    inset 0 0 0 10px rgba(185, 139, 55, .32);
}

.month-honor::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(86, 58, 20, .24);
  pointer-events: none;
}

.month-honor::after {
  content: "";
  position: absolute;
  top: 0;
  right: 30px;
  width: 58px;
  height: 92px;
  background: linear-gradient(180deg, var(--forest), var(--green));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  box-shadow: 0 12px 24px rgba(4, 44, 37, .22);
}

.month-honor > span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.month-honor h3 {
  color: var(--forest);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  margin-top: 8px;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(185, 139, 55, .42);
}

.rank-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.rank-list li {
  min-height: 40px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(216, 194, 138, .34);
  padding-bottom: 8px;
}

.rank-list span {
  color: var(--gold);
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
}

.rank-list b {
  overflow-wrap: anywhere;
  color: #24332f;
  font-size: 14px;
  line-height: 1.45;
}

#dialogDownload[hidden] {
  display: none;
}

.rank-list.compact {
  max-height: none;
}

.honor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 34px;
}

.honor-button,
.secondary,
.icon-button {
  min-height: 46px;
  border: 1px solid rgba(240, 207, 117, .82);
  background: #fff7df;
  color: var(--forest);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.honor-button {
  min-width: 220px;
  min-height: 58px;
  padding: 15px 24px;
  background:
    linear-gradient(180deg, rgba(255, 248, 225, .98), rgba(214, 169, 72, .9)),
    #f6dfa2;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .24),
    inset 0 0 0 2px rgba(255, 255, 255, .44);
  color: #15342c;
  letter-spacing: 0;
}

.honor-button:hover,
.secondary:hover,
.icon-button:hover {
  background: #f6e7bd;
}

.leaderboard-dialog {
  width: min(860px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  border: 0;
  padding: 0;
  background: transparent;
}

.leaderboard-dialog::backdrop {
  background: rgba(8, 47, 39, .72);
}

.dialog-panel {
  display: grid;
  max-height: min(760px, calc(100vh - 32px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .98), rgba(245, 239, 224, .98)),
    var(--paper);
  border: 8px solid var(--forest);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, .42),
    inset 0 0 0 2px rgba(240, 207, 117, .82),
    inset 0 0 0 8px rgba(255, 255, 255, .74);
}

.dialog-panel header,
.dialog-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(189, 145, 66, .38);
}

.dialog-panel footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(189, 145, 66, .38);
  border-bottom: 0;
}

.dialog-panel h2 {
  color: var(--forest);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
}

.icon-button {
  width: 44px;
  min-height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}

.dialog-list {
  overflow: auto;
  padding: 6px 26px 24px;
}

.dialog-ranks {
  max-height: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.dialog-ranks li {
  grid-template-columns: 50px minmax(0, 1fr) auto;
}

.dialog-ranks small {
  color: var(--muted);
  font-size: 12px;
}

.secondary {
  padding: 12px 18px;
}

.empty-rank {
  color: var(--muted);
  font-size: 14px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px max(24px, 5vw);
  background: var(--forest);
  color: #f9edd0;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .hero,
  .month-ranks {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 58px;
  }

  .principles {
    grid-template-columns: 1fr;
    transform: none;
    padding: 34px 0;
  }

  .month-honor {
    min-height: auto;
  }

  .dialog-ranks {
    grid-template-columns: 1fr;
  }

  .creator {
    padding: 58px 0 74px;
  }

  .creator-panels {
    grid-template-columns: 1fr;
  }

  .certificate-form .primary,
  .inquiry-form .secondary {
    margin-top: 22px;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: auto;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
    padding-block: 14px;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    padding-inline: 20px;
    min-height: 560px;
  }

  .principles,
  .creator {
    width: calc(100% - 32px);
  }

  .leaderboards {
    padding: 62px 0;
  }

  .leaderboards-inner {
    width: calc(100% - 32px);
  }

  form {
    padding: 22px;
  }

  .creator {
    gap: 22px;
    padding: 46px 0 58px;
  }

  .creator-heading {
    text-align: left;
  }

  .creator-heading h2 {
    font-size: 34px;
  }

  .creator-heading p,
  .panel-intro {
    font-size: 14px;
    line-height: 1.7;
  }

  form h3 {
    font-size: 26px;
  }

  .panel-kicker {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  footer {
    display: grid;
  }

  .honor-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Enterprise account pages */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.portal-main { max-width: 1200px; margin: 0 auto; padding: 48px 20px 80px; }
.portal-card { background: #fffaf0; border: 1px solid #e3d8bd; border-radius: 20px; padding: clamp(22px, 4vw, 40px); margin-bottom: 24px; box-shadow: 0 12px 32px rgba(15, 62, 47, .06); }
.portal-card h1, .portal-card h2 { color: #0b4d3b; }
.portal-card form { display: grid; gap: 12px; }
.portal-card label { display: grid; gap: 7px; font-weight: 700; }
.portal-card input, .portal-card select, .portal-card textarea { width: 100%; max-width: 100%; padding: 11px 13px; border: 1px solid #cbbf9f; border-radius: 9px; font: inherit; background: #fff; color: #24312c; }
.portal-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 22px 0; }
.portal-controls label { min-width: 180px; }
.portal-controls button { min-height: 44px; }
.portal-card .summary { padding: 18px; margin: 18px 0; font-weight: 700; color: #0b4d3b; }
.table-scroll { overflow: auto; max-height: 640px; border: 1px solid #e3d8bd; border-radius: 10px; }
.portal-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.portal-table th, .portal-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ece4d4; }
.portal-table th { position: sticky; top: 0; background: #0b4d3b; color: #fff; }
.portal-table tr:nth-child(even) { background: #f8f5ed; }
.review-card { border-top: 1px solid #d9ceb7; padding: 24px 0; }
.review-card p { overflow-wrap: anywhere; }
.review-form { max-width: 760px; }
.review-form button { width: fit-content; }
@media (max-width: 720px) { .portal-main { padding: 24px 12px 48px; } .portal-card { padding: 20px; } .portal-controls { display: grid; } }

/* 2026 account experience: clear contrast and responsive reading layout */
:root {
  --forest: #073b32;
  --green: #0c5949;
  --green-2: #17745c;
  --gold: #9b6c20;
  --gold-2: #edcb80;
  --ink: #1c302b;
  --muted: #54655e;
  --paper: #fffefa;
  --cream: #f6f2e8;
  --line: #d7d2c3;
  --shadow: 0 16px 42px rgba(7, 59, 50, .08);
}

body { background: #f6f5ef; line-height: 1.65; }
body::before { display: none; }
html { scroll-padding-top: 100px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #c68b2f;
  outline-offset: 3px;
}
button:disabled { opacity: .58; cursor: not-allowed; }
.skip-link { position: fixed; z-index: 30; top: -60px; left: 16px; padding: 10px 16px; background: #fff; color: var(--forest); }
.skip-link:focus { top: 12px; }

.site-header { min-height: 78px; padding: 14px clamp(20px, 4vw, 64px); background: rgba(255, 254, 250, .97); box-shadow: 0 4px 22px rgba(7, 59, 50, .04); }
.brand span { color: #52645c; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.brand b { color: var(--forest); font-size: clamp(17px, 1.7vw, 21px); }
nav { gap: 4px; align-items: center; font-size: 13px; }
nav a, nav button { min-height: 42px; display: inline-flex; align-items: center; border-radius: 8px; padding: 8px 12px; }
nav a:hover, nav a:focus-visible { background: #e9eee9; border-color: transparent; }

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: clamp(36px, 6vw, 110px); align-items: center; min-height: 560px; padding: clamp(70px, 8vw, 120px) max(24px, calc((100vw - 1240px) / 2)) 90px; background: #f1eee3; border-bottom: 1px solid #dfd9c9; }
.hero::before { inset: auto 0 0; height: 5px; border: 0; box-shadow: none; background: linear-gradient(90deg, var(--forest), #d4ae68); }
.hero::after { width: 360px; right: 17%; bottom: -180px; border: 1px solid rgba(21, 96, 78, .09); border-radius: 50%; transform: none; }
.hero-copy { max-width: 790px; }
.hero .eyebrow { color: var(--green); }
.hero h1 { font-size: clamp(42px, 5vw, 72px); line-height: 1.18; letter-spacing: -.02em; }
.lead { max-width: 690px; color: #40564e; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.8; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.primary { border: 1px solid var(--forest); border-radius: 9px; background: var(--forest); color: #fff; box-shadow: none; transition: background .2s ease, transform .2s ease; }
.primary:hover { background: #145f4d; transform: translateY(-2px); }
.hero-link { color: var(--forest); font-weight: 800; text-decoration: underline; text-decoration-color: #ad8d50; text-underline-offset: 5px; }
.hero-link span { margin-left: 4px; }
.hero-aside { position: relative; z-index: 1; padding: clamp(28px, 3vw, 42px); border-radius: 22px; background: #0d483c; box-shadow: 0 28px 55px rgba(6, 46, 38, .19); color: #f9f4e8; }
.hero-aside-label { display: block; margin-bottom: 20px; color: #e9ca8a; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.hero-aside strong { display: block; font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(28px, 2.4vw, 38px); line-height: 1.45; }
.hero-aside ol { list-style: none; display: grid; gap: 0; margin: 28px 0 0; padding: 0; }
.hero-aside li { display: flex; align-items: center; gap: 16px; border-top: 1px solid rgba(255,255,255,.2); padding: 13px 0; font-weight: 650; }
.hero-aside li span { color: #e9ca8a; font-family: Georgia, serif; font-size: 15px; font-weight: 800; }

.principles { width: min(1240px, calc(100% - 48px)); transform: none; gap: 16px; padding: 58px 0; }
.principles article { min-height: 0; border: 1px solid #e0dccf; border-radius: 16px; background: #fffefa; box-shadow: none; padding: 28px; }
.principles b { width: 42px; height: 42px; background: #e9eee9; color: var(--forest); font-size: 21px; }
.principles h2 { margin-top: 14px; font-size: 19px; }
.principles p { margin: 8px 0 0; color: #4d6057; font-size: 14px; }

.leaderboards { padding: 82px 0 90px; overflow: visible; background: #e8efe9; color: var(--ink); border-top: 1px solid #d5e1d8; border-bottom: 1px solid #d5e1d8; -webkit-user-select: none; user-select: none; }
.leaderboards::before, .leaderboards::after { display: none; }
.leaderboards-inner { width: min(1240px, calc(100% - 48px)); }
.leader-copy { max-width: 850px; margin-bottom: 30px; }
.leaderboards .eyebrow { color: #1b694f; }
.leader-copy h2 { color: var(--forest); text-shadow: none; }
.leader-copy p { color: #425e52; font-size: 16px; }
.month-ranks { gap: 18px; align-items: stretch; }
.month-card { min-width: 0; padding: 27px 25px 22px; border: 1px solid #d9e1d8; border-radius: 18px; background: #fffefa; box-shadow: 0 10px 28px rgba(5, 46, 37, .06); }
.month-card h3 { padding-bottom: 16px; border-bottom: 2px solid #d4e1d6; color: var(--forest); font-size: clamp(20px, 2vw, 26px); }
.month-card .rank-list { max-height: none; overflow: visible; gap: 0; margin-top: 6px; }
.month-card .rank-list li { min-height: 54px; grid-template-columns: 30px minmax(0,1fr); gap: 10px; border-bottom: 1px solid #e7ece5; padding: 10px 0; }
.month-card .rank-list li:last-child { border-bottom: 0; }
.rank-list span { color: #986716; font-size: 17px; }
.rank-list b { color: #213a30; font-size: 14px; font-weight: 700; line-height: 1.5; }
.honor-actions { margin-top: 28px; gap: 12px; }
.honor-button { min-width: 190px; min-height: 50px; border: 1px solid #b5cbbb; border-radius: 9px; background: #fffefa; box-shadow: none; color: var(--forest); padding: 12px 18px; font-size: 14px; transition: background .2s ease; }
.honor-button:hover { background: #dce9df; }
.annual-leaderboard { max-width: 860px; margin: 0 auto; border: 1px solid #b5cbbb; border-radius: 12px; background: #fffefa; overflow: hidden; }
.annual-leaderboard summary { padding: 18px 24px; color: var(--forest); font-weight: 800; cursor: pointer; }
.annual-leaderboard summary:hover { background: #dce9df; }
.annual-leaderboard summary:focus-visible { outline: 3px solid var(--forest); outline-offset: -4px; }
.annual-leaderboard[open] summary { border-bottom: 1px solid #d5e1d8; }
.annual-leaderboard-list { padding: 12px 24px 24px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.annual-leaderboard-list .rank-list { max-height: none; overflow: visible; margin: 0; }
.annual-leaderboard-list .rank-list li { grid-template-columns: 36px minmax(0, 1fr); min-height: 46px; border-bottom: 1px solid #e7ece5; }
.annual-leaderboard-list .rank-list li:last-child { border-bottom: 0; }
.dialog-panel { border: 5px solid var(--forest); background: #fffefa; box-shadow: 0 25px 70px rgba(2, 35, 27, .3); }
.dialog-ranks li { min-height: 45px; }

.creator { width: min(1240px, calc(100% - 48px)); gap: 32px; padding: 84px 0 100px; }
.creator-heading { max-width: 780px; }
.creator-panels { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .75fr); gap: 20px; align-items: start; }
.certificate-form { min-height: 0; }
.certificate-form, .application-note { border: 1px solid #ded9cb; border-radius: 18px; background: #fffefa; box-shadow: var(--shadow); padding: clamp(26px, 3vw, 40px); }
.certificate-form::before { height: 4px; background: var(--forest); }
.certificate-form h3 { margin-top: 12px; }
.certificate-form .panel-intro { margin-bottom: 22px; }
.registration-fields, .inquiry-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 20px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { margin-top: 10px; }
.certificate-form .primary { width: auto; margin-top: 24px; }
.application-note { background: #0e473b; color: #f9f5e9; }
.application-note .note-index { color: #e7c987; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.application-note h3 { margin-top: 20px; font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 28px; line-height: 1.4; }
.application-note p { color: #e2ede3; line-height: 1.8; }
.application-note strong { color: #f3dba0; }
.note-divider { height: 1px; margin: 30px 0; background: rgba(255,255,255,.25); }
.fine a { color: var(--forest); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.portal-main { width: min(1240px, calc(100% - 48px)); max-width: none; padding: 52px 0 90px; }
.portal-card { border-color: #dcded3; border-radius: 18px; background: #fffefa; box-shadow: var(--shadow); }
.portal-card h1 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.2; }
.portal-card h2 { font-size: clamp(23px, 2.5vw, 32px); }
.portal-card p { color: #4d6057; }
.portal-card form { border: 0; box-shadow: none; background: transparent; padding: 0; overflow: visible; }
.portal-card form::before { display: none; }
.portal-main #loginPanel { max-width: 620px; margin-inline: auto; }
#loginPanel form { margin-top: 20px; }
#loginPanel .text-button { padding: 0; border: 0; background: none; color: var(--forest); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
#loginPanel .text-button:hover { color: var(--green-2); }
#loginPanel .form-status:empty { display: none; }
.portal-card .inquiry-form { display: block; }
.portal-card .inquiry-form .primary { width: auto; margin-top: 22px; }
.portal-card input[readonly] { background: #eff3ed; color: #405b4e; }
.portal-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.portal-actions a { display: grid; align-content: start; gap: 8px; min-height: 145px; padding: 19px; border: 1px solid #d8e2d7; border-radius: 16px; background: #eaf1e9; color: var(--forest); transition: transform .2s ease, background .2s ease; }
.portal-actions a:hover { transform: translateY(-3px); background: #dfecdf; }
.portal-actions span { color: #91661c; font-family: Georgia, serif; font-weight: 800; }
.portal-actions strong { font-size: 17px; line-height: 1.35; }
.portal-actions small { color: #52665b; font-size: 12px; }
.portal-controls { gap: 12px; }
.portal-controls #orderSearchLabel { position: relative; min-width: min(340px,100%); }
.order-search-field > label { display: block; }
.order-search-field > input { width: 100%; }
.portal-controls .order-search-field { flex: 1 1 340px; }
.order-search-field > small { display: block; margin-top: 6px; color: #52665b; line-height: 1.5; }
.order-suggestions { position: absolute; z-index: 20; top: calc(100% - 24px); left: 0; right: 0; max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid #b7c7b8; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px #092e272b; }
.order-suggestions[hidden] { display: none; }
.order-suggestions button { display: block; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 6px; background: #fff; color: var(--forest); font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.order-suggestions button:hover, .order-suggestions button:focus-visible { background: #eaf1e9; outline: 2px solid #168466; outline-offset: -2px; }
.order-suggestions .order-group-option { background: #eaf1e9; font-weight: 800; }
.selected-scope-badge { display: inline-block; margin: 18px 0 8px; padding: 11px 16px; border: 1px solid #92bca7; border-radius: 12px; background: #e6f3e9; color: #064734 !important; font-weight: 800; line-height: 1.5; }
.selected-scope-badge[hidden] { display: none; }
.matched-units-details { margin: 4px 0 16px; padding: 12px 16px; border: 1px solid #d3dfd4; border-radius: 12px; background: #f6faf5; color: var(--forest); }
.matched-units-details[hidden] { display: none; }
.matched-units-details summary { cursor: pointer; font-weight: 700; }
.matched-units-details ul { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 6px 20px; margin: 12px 0 0; padding-left: 18px; }
.order-suggestions p { margin: 4px 8px; color: #52665b; font-size: 14px; }
.workflow-heading { display: flex; align-items: center; gap: 12px; margin: 28px 0 18px; color: var(--forest); font-size: clamp(20px,2vw,26px); }
.workflow-heading span { display: inline-grid; place-items: center; min-width: 38px; min-height: 38px; border-radius: 50%; background: var(--forest); color: #fff; font: 800 15px "Noto Sans TC",sans-serif; }
.workflow-section { margin-top: 30px; padding-top: 24px; border-top: 1px solid #d8e2d7; }
.workflow-section .workflow-heading { margin-top: 0; }
.certificate-scope { padding: 14px 17px; border-radius: 12px; background: #eaf1e9; color: var(--forest) !important; font-weight: 800; }
.certificate-controls { align-items: center; }
.certificate-controls button:disabled { cursor: not-allowed; opacity: .55; }
.portal-card .manual-certificate-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr) minmax(160px, 1fr) auto; align-items: end; gap: 12px; margin: 20px 0 8px; }
.manual-certificate-form button { min-height: 44px; }
.portal-table th { background: var(--forest); }
.table-scroll { border-color: #dfe5dc; }
.service-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.coming-soon { flex: none; border-radius: 999px; background: #f3ead0; color: #745211; padding: 7px 13px; font-size: 13px; font-weight: 800; }
.review-notice { border-left: 3px solid #ba8c3e; padding-left: 10px; font-size: 13px; }
.account-identity { display: grid; min-width: 150px; max-width: 300px; padding: 5px 12px; border-left: 2px solid var(--gold-2); line-height: 1.3; text-align: left; overflow-wrap: anywhere; }
.account-identity strong { color: var(--forest); font-size: 13px; }
.account-identity small { color: var(--muted); font-size: 11px; }
.collapsible-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; color: var(--forest); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; }
.collapsible-card > summary::-webkit-details-marker { display: none; }
.collapsible-card > summary::after { content: "展開"; flex: none; color: var(--green); border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; font: 700 13px "Noto Sans TC", sans-serif; }
.collapsible-card[open] > summary::after { content: "收合"; }
.collapsible-card > summary:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 5px; }
.collapsible-content { padding-top: 20px; }
.portal-card .summary-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 12px; background: transparent; padding: 0; }
.metric-card { display: grid; align-content: space-between; gap: 9px; min-height: 110px; padding: 17px; border-radius: 12px; border: 1px solid #d8e2d7; background: #edf3eb; }
.metric-card span { color: #3f6351; font-size: 14px; }
.metric-card strong { color: var(--forest); font-size: clamp(20px,2vw,28px); }
.order-counting-note { margin: 0 0 14px; color: #52665b; font-size: 13px; line-height: 1.6; }
.monthly-chart-card { margin: 28px 0 0; padding: clamp(18px,3vw,28px); border: 1px solid #d8e2d7; border-radius: 16px; background: #fbfcf9; }
.monthly-chart-card figcaption { margin-bottom: 20px; color: var(--forest); font-size: clamp(19px,2vw,24px); font-weight: 800; }
.monthly-chart { display: grid; gap: 12px; }
.monthly-chart-row { display: grid; grid-template-columns: 42px minmax(0,1fr) minmax(145px,auto); align-items: center; gap: 12px; min-height: 26px; }
.monthly-chart-month { color: #3f6351; font-size: 14px; font-weight: 700; }
.monthly-chart-track { display: block; height: 17px; overflow: hidden; border-radius: 999px; background: #e8eee8; }
.monthly-chart-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#168466,#0b4d3b); }
.monthly-chart-value { color: var(--forest); font-size: 14px; text-align: right; white-space: nowrap; }
.portal-dialog { width: min(760px, calc(100% - 28px)); max-height: min(85vh,900px); padding: clamp(20px,4vw,36px); overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(5,40,32,.24); }
.portal-dialog::backdrop { background: rgba(3,32,25,.6); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin-top: 0; color: var(--forest); }
.portal-dialog form { display: grid; gap: 12px; }
.portal-dialog label { display: grid; gap: 6px; font-weight: 700; }
.portal-dialog input, .portal-dialog textarea { width: 100%; padding: 11px 13px; border: 1px solid #cbbf9f; border-radius: 9px; font: inherit; color: var(--ink); }
.portal-dialog ol { padding-left: 24px; line-height: 1.9; }
.certificate-options-dialog { width: min(690px, calc(100% - 28px)); }
.certificate-options-dialog .eyebrow { margin: 0 0 5px; }
.certificate-options-dialog .dialog-heading h2 { margin: 0; }
.certificate-options-dialog > p { line-height: 1.7; }
.certificate-options-scope { margin: 18px 0 20px; padding: 13px 16px; border-left: 4px solid var(--forest); border-radius: 0 9px 9px 0; background: #eaf1e9; color: var(--forest); font-weight: 800; }
.certificate-option-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.certificate-option-list legend { margin-bottom: 12px; color: var(--forest); font-weight: 800; }
.portal-dialog .certificate-option { display: flex; align-items: flex-start; gap: 12px; min-height: 125px; padding: 18px; border: 2px solid #d8d6ca; border-radius: 13px; background: #fffefa; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.portal-dialog .certificate-option:hover { border-color: var(--forest); }
.portal-dialog .certificate-option:has(input:checked) { border-color: var(--forest); background: #eaf1e9; box-shadow: inset 0 0 0 1px var(--forest); }
.portal-dialog .certificate-option:focus-within { outline: 3px solid #bd9142; outline-offset: 2px; }
.portal-dialog .certificate-option input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; accent-color: var(--forest); }
.certificate-option strong, .certificate-option small { display: block; }
.certificate-option strong { color: var(--forest); font-size: 18px; }
.certificate-option small { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.certificate-options-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.certificate-options-actions button { min-height: 44px; }

@media (max-width: 1050px) {
  .site-header { position: static; align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 36px; padding: 70px max(24px, 5vw); }
  .hero-aside { max-width: 680px; }
  .month-ranks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .creator-panels { grid-template-columns: 1fr; }
  .portal-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 20px; }
  .site-header { padding: 15px 16px; }
  .brand b { font-size: 17px; }
  nav { width: 100%; flex-wrap: wrap; justify-content: flex-start; overflow: visible; gap: 6px; padding-bottom: 3px; }
  nav a, nav button { flex: none; padding: 8px 10px; white-space: nowrap; }
  .account-identity { order: -1; flex: 1 0 100%; max-width: none; }
  .hero { padding: 64px 20px 56px; }
  .hero h1 { font-size: clamp(35px, 10vw, 48px); }
  .lead { margin: 18px 0 26px; font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .hero-actions .primary { width: 100%; }
  .hero-aside { padding: 25px; }
  .hero-aside strong { font-size: 28px; }
  .principles, .leaderboards-inner, .creator, .portal-main { width: calc(100% - 32px); }
  .principles { grid-template-columns: 1fr; gap: 10px; padding: 36px 0; }
  .principles article { padding: 21px; }
  .leaderboards { padding: 56px 0 64px; }
  .leader-copy { text-align: left; }
  .leader-copy p { font-size: 14px; }
  .month-ranks { grid-template-columns: 1fr; gap: 12px; }
  .month-card { padding: 22px 20px; }
  .month-card .rank-list li { min-height: 48px; }
  .honor-actions { display: grid; grid-template-columns: 1fr; }
  .honor-button { width: 100%; min-height: 48px; }
  .creator { padding: 58px 0 72px; }
  .registration-fields, .inquiry-grid { grid-template-columns: 1fr; }
  .certificate-form, .application-note { padding: 23px; }
  .certificate-form .primary { width: 100%; }
  .portal-main { padding: 26px 0 56px; }
  .portal-card { padding: 22px; }
  .portal-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .portal-actions a { min-height: 124px; padding: 13px; }
  .portal-actions strong { font-size: 14px; }
  .portal-actions small { font-size: 11px; }
  .portal-controls { display: grid; grid-template-columns: 1fr; }
  .portal-card .manual-certificate-form { grid-template-columns: 1fr; }
  .portal-controls label, .portal-controls button { width: 100%; }
  .portal-controls .order-search-field { width: 100%; }
  .portal-card .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .certificate-option-list { grid-template-columns: 1fr; }
  .portal-dialog .certificate-option { min-height: 0; padding: 15px; }
  .certificate-options-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .certificate-options-actions button { width: 100%; }
  .metric-card { min-height: 96px; padding: 12px; }
  .metric-card strong { font-size: 19px; }
  .monthly-chart-row { grid-template-columns: 32px minmax(0,1fr) minmax(66px,auto); gap: 7px; }
  .monthly-chart-month, .monthly-chart-value { font-size: 12px; }
  .service-heading { align-items: flex-start; flex-direction: column; }
  footer { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .primary, .portal-actions a { transition: none; }
  .primary:hover, .portal-actions a:hover { transform: none; }
}

/* Member account management */
.account-search-form { display: flex; align-items: end; gap: 12px; margin: 20px 0 12px; }
.account-search-form label { flex: 1; }
.account-search-form button { margin-bottom: 0; }
.member-account-card h3, .account-email { overflow-wrap: anywhere; }
.account-row-actions, .account-pagination { display: flex; flex-wrap: wrap; gap: 12px; }
.account-binding-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #d9ceb7; }
.account-binding-row span { overflow-wrap: anywhere; min-width: 0; }
.account-binding-row button { flex-shrink: 0; }
.account-bound-organizations { margin-bottom: 24px; }
@media (max-width: 600px) {
  .account-search-form { align-items: stretch; flex-direction: column; }
  .account-row-actions button { flex: 1 1 auto; }
}

/* Physical order administration */
.physical-order-admin{margin-top:28px;border-top:1px solid #d7dfd6;padding-top:20px}.physical-order-admin>summary{cursor:pointer;font-size:1.15rem;font-weight:750;padding:12px 0;color:#0b4d3b}.physical-order-row{display:flex;gap:20px;justify-content:space-between;align-items:center;padding:20px 0;border-bottom:1px solid #d7dfd6}.physical-order-row p{font-size:.9rem;margin:6px 0}.physical-order-row small{overflow-wrap:anywhere}.physical-order-row button{flex-shrink:0}.physical-order-info{display:grid;grid-template-columns:110px 1fr;gap:10px;margin:20px 0}.physical-order-info dt{color:#5f7066}.physical-order-info dd{margin:0;overflow-wrap:anywhere}#physicalOrderDialog form>label{display:grid;gap:8px;margin:16px 0}#physicalOrderDialog input:not([type=checkbox]),#physicalOrderDialog textarea{width:100%;font:inherit;padding:10px;border:1px solid #b9c4bc;border-radius:6px}.refund-confirmation{background:#fff4df;padding:18px;border:1px solid #c5a255;border-radius:8px;margin:20px 0}.refund-check,#physicalOrderDialog form>label.refund-check{display:flex;gap:10px;align-items:flex-start;margin:16px 0;font-size:.95rem}.refund-check input[type=checkbox]{width:20px;height:20px;flex-shrink:0;margin-top:4px}.danger{background:#912f22;color:#fff;border:1px solid #912f22;padding:12px 20px;border-radius:6px;font:inherit;font-weight:700;cursor:pointer}.danger:disabled{opacity:.5;cursor:default}#physicalRefundCheck{margin:14px 0}@media(max-width:640px){.physical-order-row{align-items:flex-start;flex-direction:column}.physical-order-info{grid-template-columns:80px 1fr;font-size:.9rem}.physical-order-admin .account-search-form{display:grid;grid-template-columns:1fr}}

/* Authenticated workspace: one active service beside a persistent navigation rail. */
.portal-main:has(.portal-workspace:not([hidden])) { width: min(1560px, calc(100% - 64px)); padding-top: 32px; }
.portal-workspace { display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; gap: 28px; }
.portal-sidebar { position: sticky; top: 112px; border: 1px solid #d7dfd5; border-radius: 16px; background: #f6f7f0; overflow: hidden; }
.portal-sidebar summary { display: none; }
.portal-menu-body { padding: 24px 14px 18px; }
.portal-menu-body > .eyebrow { padding-inline: 12px; margin: 0 0 18px; font-size: 12px; letter-spacing: .14em; }
#portalNavigation { display: grid; gap: 7px; }
#portalNavigation button { display: flex; align-items: baseline; gap: 12px; width: 100%; min-height: 58px; padding: 14px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #40594c; text-align: left; font: 650 15px/1.55 "Noto Sans TC", sans-serif; cursor: pointer; }
#portalNavigation button span { color: #9b7c38; font-size: 11px; font-variant-numeric: tabular-nums; }
#portalNavigation button:hover { background: #e8eee3; }
#portalNavigation button[aria-current="page"] { color: #fffdf4; background: #0b4d3b; border-color: #0b4d3b; }
#portalNavigation button[aria-current="page"] span { color: #ead493; }
#portalNavigation button:focus-visible, .portal-sidebar summary:focus-visible { outline: 3px solid #b58a36; outline-offset: -3px; }
.portal-menu-note { margin: 22px 12px 0; padding-top: 16px; border-top: 1px solid #d7dfd5; color: #657267; font-size: 12px; }
.portal-content { min-width: 0; }
.portal-content > .portal-view { margin: 0; padding: clamp(24px, 3vw, 42px); scroll-margin-top: 120px; }
.portal-content > .portal-view:focus { outline: none; }
.portal-content > .portal-view > .workflow-heading { margin-top: 8px; }
.portal-content .portal-controls .order-search-field { min-width: 0; }
.portal-content .portal-controls label { min-width: 140px; }
.portal-content .manual-certificate-form { grid-template-columns: minmax(0, 2fr) minmax(100px, 1fr); }
.portal-content .manual-certificate-form button { justify-self: start; width: auto; }
@media (max-width: 1100px) and (min-width: 861px) {
  .portal-workspace { grid-template-columns: 218px minmax(0, 1fr); gap: 20px; }
  #portalNavigation button { font-size: 14px; gap: 9px; }
}
@media (max-width: 860px) {
  .portal-main:has(.portal-workspace:not([hidden])) { width: calc(100% - 28px); padding-top: 20px; }
  .portal-workspace { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .portal-sidebar { position: static; border-radius: 12px; }
  .portal-sidebar summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; color: #0b4d3b; cursor: pointer; font-size: 14px; font-weight: 800; list-style: none; }
  .portal-sidebar summary::-webkit-details-marker { display: none; }
  .portal-sidebar summary::after { content: "+"; font-size: 22px; font-weight: 400; }
  .portal-sidebar details[open] summary::after { content: "−"; }
  #portalCurrentView { margin-left: auto; font-size: 12px; font-weight: 500; text-align: right; }
  .portal-menu-body { padding-top: 8px; }
  .portal-menu-body > .eyebrow, .portal-menu-note { display: none; }
  .portal-content > .portal-view { padding: 24px 20px; scroll-margin-top: 20px; }
  .portal-content .manual-certificate-form { grid-template-columns: minmax(0, 1fr); }
  .portal-content .manual-certificate-form button { width: 100%; }
}
