@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@500;600;700&family=Montserrat:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@600;700&display=swap');

:root {
  --night: #0d100f;
  --night-2: #151a17;
  --night-3: #1d241f;
  --paper: #f4f3ee;
  --paper-2: #e9ebe4;
  --card: rgba(255, 255, 255, 0.84);
  --ink: #171c19;
  --ink-soft: #59625c;
  --white: #fff;
  --line: rgba(35, 45, 39, 0.14);
  --line-dark: rgba(255, 255, 255, 0.13);
  --gold: #c7a969;
  --gold-bright: #edd79c;
  --red: #bd594f;
  --shadow: 0 24px 80px rgba(18, 25, 21, 0.16);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--paper); }
body { margin: 0; min-width: 320px; overflow-x: hidden; font-family: 'Montserrat', 'Noto Sans SC', 'PingFang SC', sans-serif; color: var(--ink); background: var(--paper); }
body::before { position: fixed; inset: 0; z-index: -1; content: ''; pointer-events: none; opacity: .16; background-image: repeating-linear-gradient(115deg, rgba(15, 24, 19, .07) 0 1px, transparent 1px 8px); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a, input[type='file'] { cursor: pointer; touch-action: manipulation; }
button, a { transition: transform 220ms var(--ease), background-color 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease); }
img { max-width: 100%; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.flash-stack { position: fixed; top: 86px; right: 18px; z-index: 30; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); }
.flash-message { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 1px solid rgba(199,169,105,.4); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.92); box-shadow: 0 16px 34px rgba(18,25,21,.14); font-size: 11px; }
.flash-message svg { width: 15px; height: 15px; color: #5b8e69; }
.flash-message--error { border-color: rgba(189,89,79,.36); }
.flash-message--error svg { color: var(--red); }

.page-wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 72px; }
.page-wrap--compact { width: min(760px, calc(100% - 40px)); }
.eyebrow { margin: 0; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .24em; line-height: 1.5; text-transform: uppercase; }
.display { font-family: 'Cormorant', 'Noto Serif SC', 'Songti SC', serif; font-weight: 600; letter-spacing: 0; }
.muted { color: var(--ink-soft); }
.subtle { color: rgba(255,255,255,.6); }

.admin-page { min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 84% -10%, rgba(199,169,105,.16), transparent 34%), linear-gradient(135deg, #f1f2ec, #e5e9e1 55%, #f5f4ee); }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid rgba(199,169,105,.58); border-radius: 10px; color: var(--gold); background: #fff; font-family: 'Noto Sans SC', sans-serif; font-size: 11px; font-weight: 700; }
.brand-mark--image { padding: 2px; object-fit: contain; }
.brand-copy strong { display: block; font-size: 13px; letter-spacing: .16em; }
.brand-copy span { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.top-actions, .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; padding: 0 17px; color: var(--ink); background: rgba(255,255,255,.64); font-size: 12px; font-weight: 600; }
.button:hover { transform: translateY(-2px); border-color: rgba(199,169,105,.72); box-shadow: 0 10px 22px rgba(20, 28, 23, .08); }
.button--primary { border-color: var(--night); color: var(--white); background: var(--night); }
.button--primary:hover { background: #242b26; }
.button--dark { border-color: rgba(255,255,255,.16); color: var(--white); background: rgba(255,255,255,.1); }
.button--danger { color: var(--red); border-color: rgba(189,89,79,.28); background: rgba(189,89,79,.06); }
.button--block { width: 100%; }
.button svg, .icon-button svg { width: 16px; height: 16px; stroke-width: 1.8; }
.icon-button { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.62); }
.icon-button:hover { transform: translateY(-2px); border-color: var(--gold); }

.hero-band { display: grid; grid-template-columns: 1.4fr .6fr; gap: 32px; align-items: end; margin-bottom: 26px; }
.hero-band h1 { margin: 8px 0 0; max-width: 680px; font-size: clamp(42px, 6vw, 76px); line-height: .92; color: var(--ink); }
.hero-band p:not(.eyebrow) { max-width: 520px; margin: 18px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.hero-index { justify-self: end; color: rgba(23,28,25,.32); font-size: 64px; font-weight: 700; letter-spacing: 0; line-height: 1; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(22px); }
.panel--dark { border-color: var(--line-dark); color: var(--white); background: linear-gradient(135deg, #131915, #273129); }
.panel-pad { padding: 28px; }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-title h2, .panel-title h3 { margin: 4px 0 0; font-size: 26px; line-height: 1; }
.panel-title p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.panel--dark .panel-title p { color: rgba(255,255,255,.58); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0; }
.metric { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.56); }
.metric strong { display: block; margin-top: 10px; font-size: 29px; letter-spacing: 0; }
.metric span { color: var(--ink-soft); font-size: 11px; }
.table-shell { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 840px; border-collapse: collapse; text-align: left; }
th { padding: 18px 20px; color: var(--ink-soft); border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
td { padding: 17px 20px; border-bottom: 1px solid rgba(35,45,39,.08); font-size: 12px; vertical-align: middle; }
tbody tr { transition: background-color 180ms ease; }
tbody tr:hover { background: rgba(199,169,105,.08); }
.record-name { display: flex; align-items: center; gap: 12px; }
.record-avatar { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; color: var(--gold); background: var(--night); font-family: 'Noto Sans SC', sans-serif; font-size: 14px; }
.record-name .record-avatar { display: inline-flex; margin-top: 0; color: var(--gold); font-size: 14px; }
.record-name strong { display: block; font-size: 13px; }
.record-name span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.qr-thumb { width: 50px; height: 50px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.table-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.table-actions .button { min-height: 36px; padding: 0 12px; font-size: 10px; }
.empty-state { padding: 72px 20px; text-align: center; }
.empty-state h2 { margin: 0; font-size: 32px; }
.empty-state p { max-width: 430px; margin: 12px auto 24px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }

.form-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(320px,.92fr); gap: 18px; }
.stack { display: grid; gap: 18px; align-content: start; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.field-grid .field--full { grid-column: 1 / -1; }
.field { display: block; }
.field label, .field > span { display: block; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.field input, .field textarea, .field select { display: block; width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; color: var(--ink); background: rgba(255,255,255,.72); font-size: 13px; line-height: 1.5; }
.field textarea { min-height: 112px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9aa19b; }
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(199,169,105,.14); outline: none; }
.field-help { display: block; margin-top: 7px; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.upload-zone { display: block; padding: 34px 22px; border: 1px dashed rgba(199,169,105,.68); border-radius: var(--radius-md); text-align: center; background: rgba(245,240,222,.65); }
.upload-zone svg { width: 28px; height: 28px; margin: 0 auto 14px; color: var(--gold); }
.upload-zone strong { display: block; font-size: 12px; }
.upload-zone span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.upload-zone input { width: 100%; margin-top: 18px; font-size: 11px; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.preview-grid > div { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.preview-grid img { display: block; width: 100%; height: 92px; object-fit: cover; }
.preview-grid p { overflow: hidden; margin: 0; padding: 8px; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.custom-field-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 10px; border-radius: 13px; background: rgba(233,235,228,.72); }
.custom-field-row input { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.custom-field-row button { min-height: 40px; border: 1px solid rgba(189,89,79,.28); border-radius: 10px; padding: 0 12px; color: var(--red); background: transparent; font-size: 11px; }
.submit-panel { position: relative; overflow: hidden; padding: 28px; }
.submit-panel::after { position: absolute; right: -28px; bottom: -44px; width: 180px; height: 180px; border: 1px solid rgba(237,215,156,.24); border-radius: 50%; content: ''; }
.submit-panel h2 { max-width: 310px; margin: 12px 0 0; font-size: 30px; line-height: .98; }
.submit-panel p { max-width: 370px; margin: 14px 0 0; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.8; }

.detail-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(280px,.92fr); gap: 18px; }
.data-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 24px; }
.data-cell { padding: 15px; border-radius: 14px; background: rgba(233,235,228,.68); }
.data-cell dt { color: var(--ink-soft); font-size: 10px; }
.data-cell dd { overflow-wrap: anywhere; margin: 8px 0 0; font-size: 12px; font-weight: 600; line-height: 1.55; }
.note-block { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.note-block strong { display: block; color: var(--ink-soft); font-size: 10px; }
.note-block p { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; white-space: pre-line; }
.qr-display { display: block; width: min(100%, 320px); margin: 22px auto 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.image-grid img { width: 100%; height: 190px; border-radius: 14px; object-fit: cover; }
.inline-link { color: #806634; text-decoration: underline; text-underline-offset: 3px; }

.public-page { min-height: 100vh; color: var(--ink); background: linear-gradient(155deg, #e9ece5 0%, #f5f4ee 40%, #dfe4dc 100%); }
.certificate-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 60px; }
.certificate-hero { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 56px); border: 1px solid rgba(255,255,255,.18); border-radius: 30px 30px 0 0; color: var(--white); background: radial-gradient(circle at 84% 10%, rgba(237,215,156,.34), transparent 20%), radial-gradient(circle at 12% 110%, rgba(63,100,80,.62), transparent 35%), linear-gradient(132deg, #1c1917, #263329 58%, #5f5436); }
.certificate-hero::before { position: absolute; inset: 16px; border: 1px solid rgba(237,215,156,.25); border-radius: 22px; content: ''; pointer-events: none; }
.certificate-hero::after { position: absolute; inset: 0; z-index: 0; content: ''; pointer-events: none; opacity: .12; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
.certificate-hero > * { position: relative; z-index: 1; animation: rise-in 420ms var(--ease) both; }
.certificate-hero > .certificate-identity { animation-delay: 90ms; }
.certificate-meta { display: flex; align-items: flex-start; gap: 16px; }
.certificate-logo { flex: 0 0 auto; width: auto; height: 84px; max-width: 168px; padding: 0; border: 1px solid rgba(237,215,156,.56); border-radius: 14px; object-fit: contain; background: #fff; }
.certificate-logo--fallback { display: inline-flex; width: 84px; height: 84px; align-items: center; justify-content: center; padding: 0; color: var(--gold); font-family: 'Noto Sans SC', sans-serif; font-size: 16px; font-weight: 700; }
.certificate-hero h1 { max-width: 720px; margin: 16px 0 0; font-size: clamp(36px, 6.4vw, 86px); line-height: .88; }
.certificate-hero .tagline { max-width: 600px; margin: 18px 0 0; color: rgba(255,255,255,.7); font-size: 13px; line-height: 1.8; }
.certificate-identity { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: stretch; gap: 0; margin: 32px 4px 0; padding: 18px 22px; border: 1px solid rgba(237,215,156,.28); border-radius: 16px; background: rgba(8,10,9,.28); }
.certificate-identity__item { min-width: 0; margin: 0; padding: 2px 10px; }
.certificate-identity__item dt { color: rgba(237,215,156,.72); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.certificate-identity__item dd { overflow-wrap: anywhere; margin: 10px 0 0; color: var(--white); font-family: 'Noto Sans SC', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.35; }
.certificate-identity__item--code dd { font-family: 'Cormorant', 'Noto Serif SC', serif; font-size: clamp(26px, 3.2vw, 34px); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .12em; line-height: 1.1; }
.certificate-identity__rule { width: 1px; margin: 6px 8px; background: rgba(237,215,156,.32); }
.certificate-extras { margin-top: 24px; }
.certificate-extras .info-grid { margin-top: 12px; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.certificate-nav { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: 10px; border: 1px solid var(--line); border-top: 0; background: rgba(255,255,255,.82); backdrop-filter: blur(20px); }
.certificate-nav a { display: flex; min-height: 46px; align-items: center; justify-content: center; gap: 7px; border-radius: 12px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.certificate-nav a:hover { color: var(--ink); background: rgba(199,169,105,.12); }
.certificate-nav a.is-active { color: var(--white); background: var(--night); }
.certificate-content { padding: 22px; border: 1px solid var(--line); border-top: 0; background: rgba(255,255,255,.76); }
.certificate-layout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(300px,.95fr); gap: 18px; }
.content-panel { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(245,244,238,.72); }
.content-panel h2 { margin: 8px 0 0; font-size: clamp(32px, 5vw, 44px); line-height: 1.05; }
.info-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 20px; }
.info-cell { padding: 14px; border: 1px solid rgba(35,45,39,.08); border-radius: 13px; background: rgba(255,255,255,.84); }
.info-cell span { color: #7e8a81; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.info-cell strong { display: block; margin-top: 8px; font-size: 12px; line-height: 1.55; }
.info-cell--action { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.info-cell--action strong { margin-top: 0; margin-left: auto; color: #806634; }
.info-cell--action svg { width: 14px; height: 14px; color: var(--gold); flex: 0 0 auto; }
.info-cell--action:hover { border-color: rgba(199,169,105,.72); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(20,28,23,.08); }
.report-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-top: 0; background: rgba(255,255,255,.82); backdrop-filter: blur(20px); }
.report-page-card { margin: 0 0 16px; overflow: hidden; border: 1px solid rgba(199,169,105,.38); border-radius: 18px; background: rgba(255,255,255,.92); }
.report-page-card:last-child { margin-bottom: 0; }
.report-page-card img { display: block; width: 100%; height: auto; background: linear-gradient(145deg, #eef0eb, #d9ded8); }
.report-page-meta { padding: 10px 14px 12px; color: #7f6c3f; font-size: 10px; letter-spacing: .12em; }
.dark-callout { padding: 22px; border-radius: 20px; color: var(--white); background: linear-gradient(140deg, #101612, #2b382e); }
.dark-callout h3 { margin: 10px 0 0; font-family: 'Cormorant', serif; font-size: 32px; line-height: .92; }
.dark-callout p { margin: 12px 0 0; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.8; }
.gallery-card { margin-top: 12px; padding: 10px; border: 1px solid rgba(199,169,105,.38); border-radius: 20px; background: rgba(255,255,255,.86); }
.gallery-stage { position: relative; min-height: 280px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: linear-gradient(145deg, #eef0eb, #d9ded8); }
.gallery-slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.025); transition: opacity 400ms var(--ease), transform 500ms var(--ease); pointer-events: none; }
.gallery-slide[data-active='true'] { opacity: 1; transform: scale(1); pointer-events: auto; }
.gallery-image-shell { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; padding: 14px; }
.gallery-image { width: 100%; height: 100%; border-radius: 10px; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(13,18,15,.18)); }
.gallery-toolbar { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: 10px; }
.gallery-button, .gallery-toggle { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; color: var(--ink); background: var(--paper); font-size: 10px; font-weight: 700; }
.gallery-button:hover, .gallery-toggle:hover { border-color: var(--gold); transform: translateY(-1px); }
.gallery-dots { display: flex; align-items: center; justify-content: center; gap: 6px; }
.gallery-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #c8cec7; }
.gallery-dot[data-active='true'] { background: var(--gold); transform: scale(1.22); }
.gallery-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: #7f6c3f; font-size: 10px; }
.gallery-toggle[aria-pressed='true'] { color: var(--white); border-color: var(--night); background: var(--night); }
.notice { margin-top: 12px; padding: 18px; border: 1px solid rgba(199,169,105,.34); border-radius: 18px; background: rgba(255,255,255,.74); }
.notice p { margin: 8px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }
.social-links-panel { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.social-link-row { display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.76); }
.social-link-row:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 10px 20px rgba(20,28,23,.08); }
.social-link-row__icon { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; }
.social-link-row__name { overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; color: var(--white); background: radial-gradient(circle at 15% 10%, rgba(199,169,105,.2), transparent 28%), radial-gradient(circle at 90% 90%, rgba(70,108,81,.28), transparent 30%), var(--night); }
.auth-grid { display: grid; grid-template-columns: 1.15fr .85fr; width: min(980px, 100%); border: 1px solid var(--line-dark); border-radius: 30px; overflow: hidden; box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.auth-story { position: relative; padding: clamp(28px, 6vw, 60px); background: linear-gradient(145deg, #172019, #334538 52%, #8f773f); }
.auth-story::after { position: absolute; right: -80px; bottom: -110px; width: 320px; height: 320px; border: 1px solid rgba(237,215,156,.3); border-radius: 50%; content: ''; }
.auth-story h1 { max-width: 520px; margin: 26px 0 0; font-size: clamp(42px, 6vw, 78px); line-height: .84; }
.auth-story p { max-width: 430px; margin: 20px 0 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.9; }
.auth-points { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 42px; }
.auth-point { padding: 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(255,255,255,.08); }
.auth-point svg { width: 16px; height: 16px; color: var(--gold-bright); }
.auth-point strong { display: block; margin-top: 10px; font-size: 11px; }
.auth-form-panel { padding: clamp(28px, 5vw, 54px); color: var(--ink); background: var(--paper); }
.auth-form-panel h2 { margin: 8px 0 0; font-size: 37px; line-height: .92; }
.auth-form { display: grid; gap: 16px; margin-top: 34px; }
.auth-form .field input { background: rgba(255,255,255,.88); }
.password-card { width: min(520px, 100%); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; color: var(--ink); background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.password-head { padding: 30px; color: var(--white); background: linear-gradient(140deg, #101612, #2f3e31); }
.password-head h1 { margin: 12px 0 0; font-size: 42px; line-height: .88; }
.password-head p { margin: 14px 0 0; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.8; }
.password-body { padding: 26px 30px 32px; }
.password-record { padding: 15px; border-radius: 14px; background: var(--paper-2); }
.password-record strong { display: block; margin-top: 7px; font-size: 24px; }
.password-record span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 12px; }
.error-box { padding: 12px 14px; border: 1px solid rgba(189,89,79,.28); border-radius: 11px; color: #8b3e37; background: rgba(189,89,79,.08); font-size: 11px; }

@media (max-width: 820px) {
  .page-wrap { width: min(100% - 28px, 680px); padding-top: 24px; }
  .admin-topbar { align-items: flex-start; flex-direction: column; margin-bottom: 32px; }
  .hero-band, .form-grid, .detail-grid, .certificate-layout, .auth-grid { grid-template-columns: 1fr; }
  .hero-index { display: none; }
  .metric-grid { grid-template-columns: repeat(3,1fr); }
  .certificate-shell { width: min(100% - 24px, 680px); padding-top: 16px; }
  .certificate-content { padding: 14px; }
  .auth-page { padding: 12px; }
  .auth-story { min-height: 340px; }
  .auth-points { margin-top: 30px; }
}
@media (max-width: 520px) {
  .flash-stack { top: 12px; right: 12px; width: calc(100% - 24px); }
  .top-actions, .button-row { width: 100%; }
  .top-actions .button, .button-row .button, .report-toolbar .button { flex: 1 1 auto; }
  .panel-pad { padding: 20px; }
  .hero-band h1 { font-size: 52px; }
  .metric-grid { gap: 7px; }
  .metric { padding: 13px 10px; }
  .metric strong { font-size: 23px; }
  .metric span { font-size: 9px; }
  .field-grid, .data-grid, .info-grid, .social-links-panel { grid-template-columns: 1fr; }
  .field-grid .field--full { grid-column: auto; }
  .custom-field-row { grid-template-columns: 1fr; }
  .custom-field-row button { width: 100%; }
  .certificate-hero { border-radius: 22px 22px 0 0; padding: 32px max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left)); }
  .certificate-hero::before { inset: 10px; border-radius: 14px; }
  .certificate-hero h1 { font-size: 42px; }
  .certificate-identity { grid-template-columns: 1fr; margin: 24px 6px 0; padding: 18px 20px; }
  .certificate-identity__item { padding: 0; }
  .certificate-identity__item dd { font-size: 17px; }
  .certificate-identity__item--code dd { margin-top: 8px; font-size: 30px; }
  .certificate-identity__rule { width: auto; height: 1px; margin: 14px 0; }
  .certificate-nav a { min-height: 50px; padding: 0 4px; font-size: 10px; }
  .gallery-stage { min-height: 220px; }
  .gallery-toolbar { grid-template-columns: 1fr 1fr; }
  .gallery-dots { grid-column: 1 / -1; grid-row: 1; }
  .gallery-button { width: 100%; }
  .auth-story h1 { font-size: 58px; }
  .auth-story { min-height: 300px; padding: 28px 22px; }
  .auth-form-panel { padding: 28px 22px; }
  .password-head, .password-body { padding-left: 22px; padding-right: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .certificate-hero > * { animation: none; opacity: 1; transform: none; }
}
