:root {
  --ink: #211d21;
  --ink-soft: #655c61;
  --ink-muted: #8d8588;
  --paper: #f5f2ef;
  --paper-deep: #ebe6e1;
  --night: #211c22;
  --night-soft: #2e272e;
  --line: rgba(33, 29, 33, .14);
  --line-light: rgba(255, 255, 255, .22);
  --accent: #d28aa6;
  --accent-deep: #914f6a;
  --accent-pale: #efd2dd;
  --warm: #e9d6b8;
  --shadow: 0 14px 28px rgba(33, 29, 33, .08);
  --font-display: "JetBrains Mono", "Noto Sans SC", monospace;
  --font-body: "JetBrains Mono", "Noto Sans SC", monospace;
  --font-meta: "JetBrains Mono", "Noto Sans SC", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-pale); color: var(--ink); }

.app-shell { min-height: 100vh; overflow: hidden; }
.page-frame { min-height: 100vh; position: relative; background: var(--paper); }

.site-header { position: fixed; z-index: 20; top: 0; left: 50%; width: min(1220px, calc(100% - 64px)); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 18px 0 14px; border-bottom: 1px solid var(--line-light); color: #fff; }
.page-work .site-header, .page-notes .site-header, .page-contact .site-header { color: var(--ink); border-bottom-color: var(--line); background: var(--paper); }
.page-notes .site-header { background: var(--paper-deep); }
.page-contact .site-header { background: #f6f3ef; }
.page-about .site-header { color: #fff; border-bottom-color: var(--line-light); background: var(--night); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; font-family: var(--font-display); font-size: 17px; font-weight: 500; white-space: nowrap; }
.brand-icon { width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; object-fit: cover; background: var(--accent-pale); box-shadow: 0 4px 12px rgba(33,29,33,.18); }
.brand-mark { width: 24px; height: 24px; position: relative; display: grid; place-items: center; border: 1px solid currentColor; background: var(--accent); color: var(--night); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: currentColor; }
.brand-mark::before { width: 8px; height: 2px; transform: translate(-3px, -3px); }
.brand-mark::after { width: 2px; height: 8px; transform: translate(3px, 3px); }
.brand small { display: block; margin-top: 2px; color: currentColor; opacity: .58; font-family: var(--font-meta); font-size: 9px; line-height: 1.2; letter-spacing: .05em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 10px; border-radius: 6px; color: currentColor; opacity: .62; font-size: 13px; transition: opacity .18s ease, background-color .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; background: rgba(255,255,255,.12); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.page-work .site-nav a:hover, .page-work .site-nav a[aria-current="page"], .page-notes .site-nav a:hover, .page-notes .site-nav a[aria-current="page"], .page-contact .site-nav a:hover, .page-contact .site-nav a[aria-current="page"] { background: rgba(33,29,33,.06); }
.page-about .site-nav a:hover, .page-about .site-nav a[aria-current="page"] { background: rgba(255,255,255,.1); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.auth-link { padding: 8px 0; border: 0; color: currentColor; opacity: .68; background: transparent; font-size: 13px; transition: opacity .18s ease; }
.auth-link:hover { opacity: 1; }
.mobile-menu-toggle { display: none; width: 32px; height: 32px; padding: 0; border: 1px solid currentColor; border-radius: 8px; color: currentColor; background: transparent; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 12px; height: 1px; margin: auto; background: currentColor; content: ""; }
.menu-icon::before { transform: translateY(-4px); }
.menu-icon::after { transform: translateY(3px); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.button:hover { transform: none; }
.button:focus-visible, .icon-button:focus-visible, .auth-link:focus-visible, .site-nav a:focus-visible, .project-arrow:focus-visible, .mobile-menu-toggle:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.button-primary { background: var(--accent); color: var(--night); }
.button-primary:hover { background: #dda0b7; }
.button-ghost { border-color: var(--line-light); color: currentColor; background: transparent; }
.button-ghost:hover { background: rgba(255,255,255,.12); }
.button-dark { background: var(--night); color: #fff; }
.button-dark:hover { background: var(--night-soft); }
.button-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.button-outline:hover { background: rgba(33,29,33,.06); }
.button-full { width: 100%; }
.button:active, .project-arrow:active, .mobile-menu-toggle:active, .auth-link:active { transform: translateY(1px); }

.hero-page { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 176px max(7vw, 32px) 96px; overflow: hidden; color: #fff; background: var(--night); }
.hero-page::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(18,13,21,.8) 0%, rgba(18,13,21,.42) 54%, rgba(18,13,21,.22) 100%); }
.hero-page::after { content: ""; position: absolute; inset: 0; z-index: 0; background: url('/hero.png') center / cover no-repeat; }
.hero-content { position: relative; z-index: 2; width: min(720px, 100%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--warm); font-family: var(--font-meta); font-size: 12px; letter-spacing: .04em; }
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.hero-title { max-width: 720px; margin: 20px 0 20px; font-family: var(--font-display); font-size: clamp(48px, 7vw, 92px); line-height: 1.03; letter-spacing: -.045em; font-weight: 500; }
.hero-title span { display: block; color: var(--accent-pale); }
.hero-lede { max-width: 560px; margin: 0; color: rgba(255,255,255,.78); font-size: clamp(15px, 1.8vw, 18px); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 56px; color: rgba(255,255,255,.64); }
.hero-meta-item { display: grid; gap: 4px; min-width: 120px; }
.hero-meta-item strong { color: #fff; font-family: var(--font-meta); font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-meta-item span { color: rgba(255,255,255,.58); font-size: 12px; }
.hero-scroll { position: absolute; right: max(7vw, 32px); bottom: 48px; z-index: 2; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.62); font-size: 12px; writing-mode: vertical-rl; }
.hero-scroll::before { content: ""; width: 1px; height: 48px; background: var(--accent); }
.hero-route { position: absolute; right: max(7vw, 32px); bottom: 132px; z-index: 2; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.58); font-family: var(--font-meta); font-size: 11px; }
.hero-route span { width: 8px; height: 8px; border: 1px solid var(--accent-pale); border-radius: 50%; background: transparent; }

.page-main { position: relative; padding: 152px max(7vw, 32px) 104px; background: var(--paper); }
.page-main::before { content: ""; position: absolute; top: 154px; bottom: 104px; left: max(3vw, 20px); width: 1px; background: var(--line); }
.page-main::after { content: ""; position: absolute; top: 154px; left: calc(max(3vw, 20px) - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.page-main.dark { color: #fff; background: var(--night); }
.page-main.mist { background: var(--paper); }
.page-work .page-main { background: #efebe7; }
.page-notes .page-main { background: #e8e2dd; }
.page-contact .page-main { background: #ece8e4; }
.page-main.dark::before { background: rgba(255,255,255,.14); }
.page-intro { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(260px, .82fr); gap: 56px; align-items: end; margin-bottom: 64px; }
.page-kicker { margin: 0 0 16px; color: var(--accent-deep); font-family: var(--font-meta); font-size: 12px; letter-spacing: .04em; }
.dark .page-kicker { color: var(--accent-pale); }
.page-title { max-width: 760px; margin: 0; font-family: var(--font-display); font-size: clamp(42px, 6vw, 74px); line-height: 1.06; letter-spacing: -.04em; font-weight: 500; }
.page-title em { color: var(--accent-deep); font-style: normal; }
.dark .page-title em { color: var(--accent-pale); }
.page-intro-copy { max-width: 420px; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.dark .page-intro-copy { color: rgba(255,255,255,.66); }

.project-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.project-card { position: relative; min-height: 320px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f8f6f3; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.project-card:hover, .project-card:focus-within { border-color: var(--accent-deep); box-shadow: 0 10px 22px rgba(33,29,33,.08); }
.project-card.large { grid-column: span 7; min-height: 472px; background: var(--accent-pale); }
.project-card.tall { grid-column: span 5; min-height: 472px; border-color: rgba(255,255,255,.12); color: #fff; background: var(--night-soft); }
.project-card.small { grid-column: span 4; min-height: 288px; }
.project-swatch { position: absolute; right: 28px; bottom: 28px; width: 42%; height: 44%; opacity: .36; border: 1px solid rgba(145,79,106,.35); background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(145,79,106,.18) 18px 19px), repeating-linear-gradient(0deg, transparent 0 18px, rgba(145,79,106,.18) 18px 19px); }
.project-card.tall .project-swatch { border-color: rgba(239,210,221,.34); background: repeating-linear-gradient(90deg, transparent 0 20px, rgba(239,210,221,.14) 20px 21px), repeating-linear-gradient(0deg, transparent 0 20px, rgba(239,210,221,.14) 20px 21px); }
.project-card-head, .project-card-foot { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.project-card-foot { align-items: flex-end; }
.project-index { color: var(--accent-deep); font-family: var(--font-meta); font-size: 11px; }
.tall .project-index { color: var(--accent-pale); }
.project-card h3 { max-width: 420px; margin: 16px 0 0; font-family: var(--font-display); font-size: clamp(28px, 4vw, 52px); line-height: 1.03; letter-spacing: -.035em; font-weight: 500; }
.project-card.small h3 { font-size: 28px; }
.project-card p { max-width: 360px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.tall p { color: rgba(255,255,255,.66); }
.project-tag { color: var(--ink-muted); font-size: 11px; }
.tall .project-tag { color: rgba(255,255,255,.54); }
.project-arrow { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 8px; font-size: 17px; transition: background-color .18s ease, color .18s ease; }
.project-arrow svg, .contact-links svg { display: block; }
.project-arrow:hover, .project-arrow:focus-visible { background: var(--ink); color: #fff; }
.tall .project-arrow:hover { background: var(--accent-pale); color: var(--night); }

.signal-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 72px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.signal { padding: 24px 16px 24px 0; }
.signal strong { display: block; font-family: var(--font-meta); font-size: clamp(28px, 4vw, 44px); font-weight: 500; font-variant-numeric: tabular-nums; }
.signal span { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }

.about-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 72px; align-items: start; }
.about-note { padding: 24px; border-left: 2px solid var(--accent); background: rgba(255,255,255,.48); color: var(--ink-soft); font-size: 14px; line-height: 1.85; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; animation: about-pop .52s cubic-bezier(.2,.7,.2,1) both; }
.about-note:hover { border-left-color: var(--accent-deep); background: rgba(255,255,255,.72); transform: translateX(4px); }
.about-note strong { display: block; margin-bottom: 8px; color: var(--ink); font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.stack-list { display: grid; gap: 0; margin-top: 28px; border-top: 1px solid var(--line); }
.stack-row { display: grid; grid-template-columns: 120px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: border-color .2s ease, transform .2s ease; animation: about-pop .52s cubic-bezier(.2,.7,.2,1) both; }
.stack-row:hover { border-bottom-color: var(--accent); transform: translateX(4px); }
.stack-row:nth-child(1) { animation-delay: .08s; }
.stack-row:nth-child(2) { animation-delay: .14s; }
.stack-row:nth-child(3) { animation-delay: .2s; }
.stack-row:nth-child(4) { animation-delay: .26s; }
.stack-row span { color: var(--accent-deep); font-size: 12px; }
.stack-row strong { font-weight: 500; }
.timeline { display: grid; gap: 0; margin-top: 6px; }
.timeline-item { display: grid; grid-template-columns: 92px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line-light); transition: border-color .2s ease, transform .2s ease; animation: about-pop .52s cubic-bezier(.2,.7,.2,1) both; }
.timeline-item:hover { border-bottom-color: var(--accent-pale); transform: translateX(4px); }
.timeline-item:nth-child(1) { animation-delay: .12s; }
.timeline-item:nth-child(2) { animation-delay: .2s; }
.timeline-item:nth-child(3) { animation-delay: .28s; }
.timeline-item time { color: var(--accent-pale); font-family: var(--font-meta); font-size: 11px; }
.timeline-item h3 { margin: 0 0 8px; color: #fff; font-family: var(--font-display); font-size: 21px; letter-spacing: -.02em; font-weight: 500; }
.timeline-item p { margin: 0; color: rgba(255,255,255,.64); font-size: 13px; line-height: 1.75; }

.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.note-card { min-height: 288px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6f3; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.note-card:hover { border-color: var(--accent-deep); box-shadow: 0 10px 22px rgba(33,29,33,.08); }
.note-card:nth-child(2) { margin-top: 32px; border-color: rgba(255,255,255,.12); color: #fff; background: var(--night-soft); }
.note-card:nth-child(3) { margin-top: 64px; background: var(--accent-pale); }
.note-card h3 { max-width: 240px; margin: 16px 0; font-family: var(--font-display); font-size: 27px; line-height: 1.12; letter-spacing: -.03em; font-weight: 500; }
.note-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.note-card:nth-child(2) p { color: rgba(255,255,255,.64); }
.note-card footer { color: var(--accent-deep); font-size: 11px; }
.note-card:nth-child(2) footer { color: var(--accent-pale); }

.contact-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
.contact-aside p { max-width: 380px; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.contact-links { display: grid; gap: 0; margin-top: 28px; }
.contact-links a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 14px; }
.contact-links a span { color: var(--accent-deep); }
.form-card { padding: 32px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6f3; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field span { color: var(--ink-soft); font-size: 12px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px 13px; color: var(--ink); background: var(--paper); transition: border-color .18s ease, background-color .18s ease; }
.field input:focus, .field textarea:focus { border-color: var(--accent-deep); background: #fff; outline: none; }
.field textarea { min-height: 148px; resize: vertical; }
.form-feedback { min-height: 20px; margin: 12px 0 0; color: var(--accent-deep); font-size: 12px; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px max(7vw, 32px) 36px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.58); background: var(--night); font-size: 12px; }
.footer strong { color: #fff; font-family: var(--font-display); font-weight: 500; }
.footer-mark { display: flex; align-items: center; gap: 8px; }
.footer-admin-link { color: rgba(255,255,255,.5); transition: color .18s ease; }
.footer-admin-link:hover { color: var(--accent-pale); }

.project-list { display: grid; gap: 10px; }
.project-list-head, .project-row { display: grid; grid-template-columns: minmax(42px, .42fr) minmax(125px, 1.15fr) minmax(170px, 1.7fr) minmax(150px, 1.55fr) minmax(100px, .95fr) minmax(72px, .7fr); align-items: center; gap: 18px; }
.project-list-head { padding: 0 18px 8px; color: var(--ink-muted); font-family: var(--font-meta); font-size: 10px; letter-spacing: .02em; }
.project-row { min-height: 88px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6f3; box-shadow: 0 1px 0 rgba(33,29,33,.02); animation: project-enter .46s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--project-delay); transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.project-row:hover { border-color: var(--accent-deep); background: #fff; box-shadow: 0 10px 22px rgba(33,29,33,.08); transform: translateY(-2px); }
.project-cell { min-width: 0; display: grid; gap: 5px; align-content: center; }
.project-cell-label { display: none; color: var(--ink-muted); font-family: var(--font-meta); font-size: 9px; letter-spacing: .04em; }
.project-cell-index { justify-items: start; }
.project-cell-name h3 { overflow: hidden; margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 1.2; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.project-cell-description p { overflow: hidden; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.project-progress { min-width: 0; }
.project-progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--ink-muted); font-size: 10px; }
.project-progress-meta strong { color: var(--accent-deep); font-family: var(--font-meta); font-weight: 500; }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(33,29,33,.1); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent-deep); transition: width .65s cubic-bezier(.2,.7,.2,1); }
.project-status { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 9px; border-radius: 8px; font-size: 11px; white-space: nowrap; }
.project-status .status-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.project-status.status-developing { color: #785d1e; background: #f3e4b9; }
.project-status.status-published { color: #3e6c50; background: #d8e8dc; }
.project-status.status-paused { color: #62616a; background: #e2e2e5; }
.project-status.status-urgent { color: #8a4045; background: #f1d5d8; }
.project-status.status-testing { color: #6e4d73; background: #eadbef; }
.project-status.status-default { color: var(--ink-soft); background: #e8e4e0; }
.project-cell-status, .project-cell-price { justify-items: start; }
.project-price { color: var(--accent-deep); font-family: var(--font-meta); font-size: 14px; white-space: nowrap; }
.project-loading, .empty-state { padding: 40px 24px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-muted); font-size: 13px; text-align: center; }
.loading-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); animation: loading-breathe 1.2s ease-in-out infinite; }

.admin-main { background: #eee8e5; }
.admin-layout { display: grid; grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.admin-login-card, .admin-editor-card { min-width: 0; }
.admin-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.admin-status { color: var(--ink-muted); font-family: var(--font-meta); font-size: 11px; }
.admin-status[data-tone="success"] { color: #5a866b; }
.admin-status[data-tone="error"] { color: var(--accent-deep); }
.admin-form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-captcha-control { display: grid; grid-template-columns: minmax(92px, auto) minmax(0, 1fr); gap: 8px; align-items: center; }
.admin-captcha-control strong { padding: 11px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--accent-deep); background: #fff; font-family: var(--font-meta); font-size: 13px; text-align: center; }
.admin-captcha-control input { min-width: 0; }
.admin-projects { display: grid; gap: 8px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.admin-project-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-project-row strong, .admin-project-row span { display: block; }
.admin-project-row strong { font-family: var(--font-display); font-size: 17px; font-weight: 500; }
.admin-project-row span { margin-top: 4px; color: var(--ink-muted); font-size: 11px; }
.admin-row-actions { display: flex; gap: 8px; }
.admin-row-actions .button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.admin-row-actions .danger { color: var(--accent-deep); }

#auth-dialog { width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #fff; background: var(--night); box-shadow: 0 24px 64px rgba(17,12,18,.34); }
#auth-dialog [hidden] { display: none !important; }
#auth-dialog::backdrop { background: rgba(17,12,18,.62); backdrop-filter: blur(4px); }
.dialog-shell { position: relative; padding: 32px; }
.dialog-close { position: absolute; top: 16px; right: 16px; }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; color: #fff; background: transparent; font-size: 19px; line-height: 1; }
.dialog-copy h2 { margin: 16px 0 10px; font-family: var(--font-display); font-size: 32px; line-height: 1.08; letter-spacing: -.03em; font-weight: 500; }
.dialog-copy p { margin: 0; color: rgba(255,255,255,.64); font-size: 13px; line-height: 1.7; }
.auth-tabs { display: inline-flex; gap: 2px; margin: 24px 0 20px; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.08); }
.auth-tab { border: 0; border-radius: 6px; padding: 8px 12px; color: rgba(255,255,255,.58); background: transparent; font-size: 12px; }
.auth-tab.is-active { color: var(--night); background: var(--accent-pale); }
.auth-form .field span { color: rgba(255,255,255,.64); }
.auth-form .field input { border-color: rgba(255,255,255,.16); color: #fff; background: rgba(255,255,255,.06); }
.auth-form .field input:focus { border-color: var(--accent-pale); background: rgba(255,255,255,.1); }
.auth-verification-row { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 12px; }
.captcha-control, .code-control { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.captcha-control strong { min-width: 54px; padding: 11px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: var(--accent-pale); background: rgba(255,255,255,.06); font-family: var(--font-meta); font-size: 13px; text-align: center; }
.captcha-control input, .code-control input { min-width: 0; }
.code-control { grid-template-columns: minmax(0, 1fr) auto; }
.code-control .button { min-height: 42px; padding-inline: 10px; color: var(--accent-pale); border-color: rgba(239,210,221,.34); white-space: nowrap; }
.code-control .button:disabled { cursor: wait; opacity: .5; }
.auth-hint { margin: -4px 0 16px; color: rgba(255,255,255,.5); font-size: 11px; }
.dialog-footnote { margin-top: 20px; color: rgba(255,255,255,.42); font-size: 11px; line-height: 1.6; }

#auth-dialog[open] .dialog-shell { animation: dialog-enter .34s cubic-bezier(.2,.7,.2,1) both; }
#auth-dialog::backdrop { animation: backdrop-enter .26s ease both; }

@keyframes about-pop {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes project-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes loading-breathe { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }

@supports (view-transition-name: page) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease-out; }
}

@media (max-width: 860px) {
  .site-header { width: calc(100% - 40px); padding-top: 14px; }
  .site-nav { position: absolute; top: calc(100% + 8px); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border: 1px solid currentColor; border-radius: 8px; background: var(--night); color: #fff; }
  .page-work .site-nav, .page-notes .site-nav, .page-contact .site-nav { border-color: var(--line); color: var(--ink); background: var(--paper); }
  .page-about .site-nav { border-color: var(--line-light); color: #fff; background: var(--night); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 12px; }
  .mobile-menu-toggle { display: grid; place-items: center; }
  .header-actions .button-primary { min-height: 36px; padding: 7px 11px; }
  .hero-page { padding-top: 156px; }
  .hero-scroll, .hero-route { display: none; }
  .page-intro, .about-grid, .contact-layout, .admin-layout { grid-template-columns: 1fr; gap: 28px; }
  .project-card.large, .project-card.tall, .project-card.small { grid-column: span 12; min-height: 340px; }
  .signal-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .notes-grid { grid-template-columns: 1fr; }
  .note-card:nth-child(2), .note-card:nth-child(3) { margin-top: 0; }
  .project-list-head { display: none; }
  .project-row { grid-template-columns: 42px minmax(120px, 1fr) minmax(140px, 1.4fr) minmax(130px, 1.25fr) 98px 70px; gap: 12px; }
}

@media (max-width: 560px) {
  .site-header { width: calc(100% - 32px); }
  .brand { min-width: 0; font-size: 16px; }
  .brand small { display: none; }
  .auth-link { display: none; }
  .hero-page { min-height: 760px; padding: 140px 24px 48px; }
  .hero-page::after { background-position: 60% center; }
  .hero-title { font-size: clamp(46px, 15vw, 76px); }
  .hero-meta { gap: 20px; margin-top: 44px; }
  .page-main { padding: 128px 24px 72px; }
  .page-main::before, .page-main::after { display: none; }
  .page-title { font-size: 46px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 24px; }
  .brand-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .project-row { grid-template-columns: 1fr auto; gap: 12px; padding: 16px; }
  .project-cell-label { display: block; }
  .project-cell-index, .project-cell-name, .project-cell-description, .project-cell-progress { grid-column: 1 / -1; }
  .project-cell-index { display: flex; align-items: baseline; gap: 8px; }
  .project-cell-status { grid-column: 1; }
  .project-cell-price { grid-column: 2; grid-row: auto; justify-items: end; }
  .project-cell-name h3 { white-space: normal; }
  .auth-verification-row { grid-template-columns: 1fr; gap: 0; }
  .admin-project-row { align-items: flex-start; flex-direction: column; }
  .footer { flex-direction: column; align-items: flex-start; padding: 28px 24px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
/* progress-scale-start */
.progress-fill.progress-0 { width: 0%; }
.progress-fill.progress-1 { width: 1%; }
.progress-fill.progress-2 { width: 2%; }
.progress-fill.progress-3 { width: 3%; }
.progress-fill.progress-4 { width: 4%; }
.progress-fill.progress-5 { width: 5%; }
.progress-fill.progress-6 { width: 6%; }
.progress-fill.progress-7 { width: 7%; }
.progress-fill.progress-8 { width: 8%; }
.progress-fill.progress-9 { width: 9%; }
.progress-fill.progress-10 { width: 10%; }
.progress-fill.progress-11 { width: 11%; }
.progress-fill.progress-12 { width: 12%; }
.progress-fill.progress-13 { width: 13%; }
.progress-fill.progress-14 { width: 14%; }
.progress-fill.progress-15 { width: 15%; }
.progress-fill.progress-16 { width: 16%; }
.progress-fill.progress-17 { width: 17%; }
.progress-fill.progress-18 { width: 18%; }
.progress-fill.progress-19 { width: 19%; }
.progress-fill.progress-20 { width: 20%; }
.progress-fill.progress-21 { width: 21%; }
.progress-fill.progress-22 { width: 22%; }
.progress-fill.progress-23 { width: 23%; }
.progress-fill.progress-24 { width: 24%; }
.progress-fill.progress-25 { width: 25%; }
.progress-fill.progress-26 { width: 26%; }
.progress-fill.progress-27 { width: 27%; }
.progress-fill.progress-28 { width: 28%; }
.progress-fill.progress-29 { width: 29%; }
.progress-fill.progress-30 { width: 30%; }
.progress-fill.progress-31 { width: 31%; }
.progress-fill.progress-32 { width: 32%; }
.progress-fill.progress-33 { width: 33%; }
.progress-fill.progress-34 { width: 34%; }
.progress-fill.progress-35 { width: 35%; }
.progress-fill.progress-36 { width: 36%; }
.progress-fill.progress-37 { width: 37%; }
.progress-fill.progress-38 { width: 38%; }
.progress-fill.progress-39 { width: 39%; }
.progress-fill.progress-40 { width: 40%; }
.progress-fill.progress-41 { width: 41%; }
.progress-fill.progress-42 { width: 42%; }
.progress-fill.progress-43 { width: 43%; }
.progress-fill.progress-44 { width: 44%; }
.progress-fill.progress-45 { width: 45%; }
.progress-fill.progress-46 { width: 46%; }
.progress-fill.progress-47 { width: 47%; }
.progress-fill.progress-48 { width: 48%; }
.progress-fill.progress-49 { width: 49%; }
.progress-fill.progress-50 { width: 50%; }
.progress-fill.progress-51 { width: 51%; }
.progress-fill.progress-52 { width: 52%; }
.progress-fill.progress-53 { width: 53%; }
.progress-fill.progress-54 { width: 54%; }
.progress-fill.progress-55 { width: 55%; }
.progress-fill.progress-56 { width: 56%; }
.progress-fill.progress-57 { width: 57%; }
.progress-fill.progress-58 { width: 58%; }
.progress-fill.progress-59 { width: 59%; }
.progress-fill.progress-60 { width: 60%; }
.progress-fill.progress-61 { width: 61%; }
.progress-fill.progress-62 { width: 62%; }
.progress-fill.progress-63 { width: 63%; }
.progress-fill.progress-64 { width: 64%; }
.progress-fill.progress-65 { width: 65%; }
.progress-fill.progress-66 { width: 66%; }
.progress-fill.progress-67 { width: 67%; }
.progress-fill.progress-68 { width: 68%; }
.progress-fill.progress-69 { width: 69%; }
.progress-fill.progress-70 { width: 70%; }
.progress-fill.progress-71 { width: 71%; }
.progress-fill.progress-72 { width: 72%; }
.progress-fill.progress-73 { width: 73%; }
.progress-fill.progress-74 { width: 74%; }
.progress-fill.progress-75 { width: 75%; }
.progress-fill.progress-76 { width: 76%; }
.progress-fill.progress-77 { width: 77%; }
.progress-fill.progress-78 { width: 78%; }
.progress-fill.progress-79 { width: 79%; }
.progress-fill.progress-80 { width: 80%; }
.progress-fill.progress-81 { width: 81%; }
.progress-fill.progress-82 { width: 82%; }
.progress-fill.progress-83 { width: 83%; }
.progress-fill.progress-84 { width: 84%; }
.progress-fill.progress-85 { width: 85%; }
.progress-fill.progress-86 { width: 86%; }
.progress-fill.progress-87 { width: 87%; }
.progress-fill.progress-88 { width: 88%; }
.progress-fill.progress-89 { width: 89%; }
.progress-fill.progress-90 { width: 90%; }
.progress-fill.progress-91 { width: 91%; }
.progress-fill.progress-92 { width: 92%; }
.progress-fill.progress-93 { width: 93%; }
.progress-fill.progress-94 { width: 94%; }
.progress-fill.progress-95 { width: 95%; }
.progress-fill.progress-96 { width: 96%; }
.progress-fill.progress-97 { width: 97%; }
.progress-fill.progress-98 { width: 98%; }
.progress-fill.progress-99 { width: 99%; }
.progress-fill.progress-100 { width: 100%; }
/* progress-scale-end */

/* unified editorial surface */
.page-work .site-header, .page-contact .site-header, .page-tickets .site-header, .page-admin .site-header { color: var(--ink); border-bottom-color: var(--line); background: var(--paper); }
.page-work .site-nav a:hover, .page-work .site-nav a[aria-current="page"], .page-contact .site-nav a:hover, .page-contact .site-nav a[aria-current="page"], .page-tickets .site-nav a:hover, .page-tickets .site-nav a[aria-current="page"], .page-admin .site-nav a:hover, .page-admin .site-nav a[aria-current="page"] { background: rgba(33,29,33,.06); }
.page-main.dark, .page-main.mist, .page-work .page-main, .page-contact .page-main, .page-tickets .page-main, .page-admin .page-main { color: var(--ink); background: var(--paper); }
.page-main.dark::before { background: var(--line); }
.page-main.dark .page-kicker, .page-main.dark .page-title em, .page-main.dark .page-intro-copy { color: inherit; }
.page-main.dark .page-title em { color: var(--accent-deep); }
.page-frame { animation: page-arrive .5s cubic-bezier(.2,.7,.2,1) both; }
.button { box-shadow: 0 4px 0 rgba(33,29,33,.04); transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(33,29,33,.12); }
.button:active { transform: translateY(0); box-shadow: 0 3px 6px rgba(33,29,33,.08); }

/* tickets */
.ticket-layout { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr); gap: 24px; align-items: start; }
.ticket-form { position: sticky; top: 112px; }
.ticket-type-options { display: grid; gap: 9px; }
.ticket-type-option { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: var(--paper); text-align: left; box-shadow: 0 2px 0 rgba(33,29,33,.03); transition: transform .2s cubic-bezier(.2,.7,.2,1), border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.ticket-type-option:hover { transform: translateY(-2px); border-color: var(--accent); background: #fff; box-shadow: 0 8px 16px rgba(33,29,33,.09); }
.ticket-type-option.is-active { transform: translateY(-1px); border-color: var(--accent-deep); background: var(--accent-pale); color: var(--accent-deep); box-shadow: inset 0 0 0 1px rgba(145,79,106,.12), 0 8px 16px rgba(145,79,106,.12); }
.ticket-type-option.type-normal { border-color: #b9d4bf; color: #3e6c50; background: #e5f0e6; }
.ticket-type-option.type-normal.is-active { border-color: #6e9b79; background: #d8e8dc; color: #315b40; box-shadow: inset 0 0 0 1px rgba(62,108,80,.12), 0 8px 16px rgba(62,108,80,.12); }
.ticket-type-option.type-normal:hover { border-color: #6e9b79; background: #dcecdf; }
.ticket-type-option.type-urgent { border-color: #e1b5ba; color: #8a4045; background: #f5dfe1; }
.ticket-type-option.type-urgent.is-active, .ticket-type-option.type-urgent:hover { border-color: #aa5960; color: #7f363c; background: #f1d5d8; box-shadow: inset 0 0 0 1px rgba(138,64,69,.12), 0 8px 16px rgba(138,64,69,.12); }
.ticket-type-symbol { width: 24px; flex: 0 0 24px; font-size: 19px; line-height: 1; text-align: center; }
.ticket-type-option > span:last-child { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ticket-type-option strong { font-size: 13px; font-weight: 600; }
.ticket-type-option small { color: currentColor; opacity: .7; font-size: 10px; }
.form-card-heading, .board-heading, .dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.form-card-heading .form-subtle, .board-heading .form-subtle, .dashboard-heading .form-subtle { max-width: 220px; color: var(--ink-muted); font-size: 11px; line-height: 1.6; text-align: right; }
.board-heading h2, .dashboard-heading h2 { margin: 8px 0 0; font-family: var(--font-display); font-size: 28px; font-weight: 500; letter-spacing: -.03em; }
.ticket-board { min-width: 0; }
.ticket-list-head { display: grid; grid-template-columns: minmax(86px, .82fr) minmax(150px, 2fr) minmax(122px, 1.2fr) minmax(112px, 1.2fr) minmax(145px, 1.5fr); gap: 14px; align-items: center; padding: 0 15px 8px; color: var(--ink-muted); font-family: var(--font-meta); font-size: 10px; letter-spacing: .02em; }
.ticket-board #ticket-list { display: grid; gap: 12px; }
.ticket-card, .admin-ticket-card { border: 1px solid var(--line); border-radius: 14px; background: #f8f6f3; box-shadow: 0 1px 0 rgba(33,29,33,.02); animation: ticket-enter .45s cubic-bezier(.2,.7,.2,1) both; transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .25s ease, background-color .25s ease; }
.ticket-card { padding: 0; overflow: hidden; border-radius: 12px; }
.ticket-card:hover, .admin-ticket-card:hover { transform: translateY(-3px); border-color: var(--accent-deep); background: #fff; box-shadow: 0 16px 28px rgba(33,29,33,.1); }
.ticket-card.ticket-card-type-normal { border-color: #c5dbc9; background: #f5faf5; }
.ticket-card.ticket-card-type-normal:hover { border-color: #6e9b79; background: #fff; box-shadow: 0 14px 24px rgba(62,108,80,.12); }
.ticket-card.ticket-card-type-urgent { border-color: #e9c1c4; background: #fdf4f4; }
.ticket-card.ticket-card-type-urgent:hover { border-color: #aa5960; background: #fff; box-shadow: 0 14px 24px rgba(138,64,69,.12); }
.ticket-card-row { display: grid; grid-template-columns: minmax(86px, .82fr) minmax(150px, 2fr) minmax(122px, 1.2fr) minmax(112px, 1.2fr) minmax(145px, 1.5fr); gap: 14px; align-items: center; min-height: 74px; padding: 12px 15px; }
.ticket-cell { min-width: 0; display: grid; gap: 5px; align-content: center; }
.ticket-cell-label { display: none; color: var(--ink-muted); font-family: var(--font-meta); font-size: 9px; letter-spacing: .04em; }
.ticket-cell-title h3 { overflow: hidden; margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 16px; line-height: 1.35; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.ticket-cell-time time { color: var(--ink-muted); font-size: 11px; white-space: nowrap; }
.ticket-cell-progress { justify-items: start; }
.ticket-cell-actions { justify-items: start; }
.ticket-type { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: max-content; min-height: 31px; padding: 5px 10px; border-radius: 10px; font-size: 10px; white-space: nowrap; }
.ticket-type .ticket-type-symbol { width: auto; flex: 0 0 auto; font-size: 13px; }
.ticket-card-head, .admin-ticket-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.ticket-card-head h3, .admin-ticket-head h3 { margin: 10px 0 0; font-family: var(--font-display); font-size: 18px; line-height: 1.3; font-weight: 500; }
.ticket-kicker { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); font-family: var(--font-meta); font-size: 10px; }
.ticket-type.type-urgent { color: #785d1e; background: #f3e4b9; }
.ticket-type.type-normal { color: var(--accent-deep); background: var(--accent-pale); }
.ticket-status { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.ticket-status.status-processing { color: #3e6c50; background: #d8e8dc; }
.ticket-status.status-urgent-processing { color: #785d1e; background: #f3e4b9; }
.ticket-status.status-completed, .ticket-status.status-withdrawn { color: #3d5e91; background: #dce7f8; }
.ticket-status.status-rejected { color: #8a4045; background: #f1d5d8; }
.ticket-card-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; color: var(--ink-muted); font-size: 11px; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-actions .button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.ticket-detail { margin: 0; padding: 18px 15px 16px; border-top: 1px solid var(--line); background: rgba(255,255,255,.58); animation: detail-open .3s cubic-bezier(.2,.7,.2,1) both; }
.ticket-content { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.ticket-attachment-row { margin-top: 14px; }
.ticket-attachment { color: var(--accent-deep); font-size: 11px; }
.ticket-no-attachment, .ticket-empty-replies { color: var(--ink-muted); font-size: 11px; }
.ticket-replies { display: grid; gap: 8px; margin-top: 18px; }
.ticket-section-label { color: var(--ink-muted); font-family: var(--font-meta); font-size: 10px; }
.ticket-reply { padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--paper); }
.ticket-reply > div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-muted); font-size: 10px; }
.ticket-reply p { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.ticket-reply-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 16px; }
.ticket-reply-form textarea { min-height: 42px; resize: vertical; }
.ticket-reply-form .button { align-self: end; min-height: 42px; }
.ticket-login-prompt { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: #f8f6f3; box-shadow: var(--shadow); }
.ticket-login-prompt h2 { margin: 8px 0; font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.ticket-login-prompt p { margin: 0; color: var(--ink-soft); font-size: 13px; }

/* admin monitoring */
.admin-dashboard, .admin-ticket-panel { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dashboard-card { min-height: 118px; display: grid; align-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); animation: dashboard-pop .45s cubic-bezier(.2,.7,.2,1) both; }
.dashboard-card span { color: var(--ink-muted); font-size: 11px; }
.dashboard-card strong { color: var(--ink); font-family: var(--font-meta); font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; }
.metric-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(33,29,33,.1); }
.metric-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent-deep); transition: width .7s cubic-bezier(.2,.7,.2,1); }
.metric-fill.metric-0 { width: 0%; }.metric-fill.metric-10 { width: 10%; }.metric-fill.metric-20 { width: 20%; }.metric-fill.metric-30 { width: 30%; }.metric-fill.metric-40 { width: 40%; }.metric-fill.metric-50 { width: 50%; }.metric-fill.metric-60 { width: 60%; }.metric-fill.metric-70 { width: 70%; }.metric-fill.metric-80 { width: 80%; }.metric-fill.metric-90 { width: 90%; }.metric-fill.metric-100 { width: 100%; }
.admin-ticket-panel #admin-ticket-list { display: grid; gap: 14px; }
.admin-ticket-card { padding: 20px; }
.admin-ticket-card .field { margin-bottom: 12px; }
.admin-ticket-card .field textarea { min-height: 92px; }
.admin-ticket-card .ticket-replies { margin-bottom: 16px; }

@keyframes page-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ticket-enter { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes dashboard-pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes detail-open { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 860px) {
  .ticket-layout { grid-template-columns: 1fr; }
  .ticket-form { position: static; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticket-login-prompt { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-card-heading, .board-heading, .dashboard-heading { flex-direction: column; gap: 8px; }
  .form-card-heading .form-subtle, .board-heading .form-subtle, .dashboard-heading .form-subtle { max-width: none; text-align: left; }
  .ticket-list-head { display: none; }
  .ticket-card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
  .ticket-cell-label { display: block; }
  .ticket-cell-title, .ticket-cell-actions { grid-column: 1 / -1; }
  .ticket-cell-title h3 { white-space: normal; }
  .ticket-cell-actions { align-items: start; }
  .ticket-card-head, .admin-ticket-head { flex-direction: column; gap: 12px; }
  .ticket-reply-form { grid-template-columns: 1fr; }
  .ticket-reply-form .button { width: 100%; }
}
