:root {
  color-scheme: light;
  --ink: #191a17;
  --paper: #f5f4f0;
  --surface: #fdfcf8;
  --line: #d7d6cf;
  --muted: #585a52;
  --accent: #ff6941;
  --accent-ink: #ad3414;
  --body: "Inter", "Helvetica Neue", Arial, "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --display: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--body); }
html { scroll-behavior: smooth; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #2471bc; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 9.5vw, 1344px); margin-inline: auto; }
.skip-link, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; inset: 8px auto auto 8px; width: auto; height: auto; margin: 0; padding: 8px 14px; clip-path: none; background: white; color: var(--ink); }
.topbar { background: #171715; color: #fff; border-bottom: 1px solid #3b3b36; }
.nav-inner, nav, .brand { display: flex; align-items: center; }
.nav-inner { min-height: 67px; justify-content: space-between; gap: 20px; }
.brand { gap: 10px; color: inherit; text-decoration: none; font: italic 900 32px/.9 var(--display); letter-spacing: -.055em; white-space: nowrap; }
.brand-mark { display: inline-flex; gap: 3px; transform: skew(-24deg); margin-left: 4px; }
.brand-mark i { display: block; width: 6px; height: 23px; background: var(--accent); }
.brand-mark i:first-child { width: 3px; }
.brand-mark i:last-child { width: 9px; }
nav { gap: 27px; }
.nav-link { color: #e2e2dc; text-decoration: none; font-size: 13px; font-weight: 650; }
.nav-link:hover, footer button:hover { color: var(--accent); }
.nav-upload { align-items: center; display: inline-flex; gap: 5px; padding: 8px 17px; border: 0; border-radius: 2px; background: var(--accent); color: #171613; font-weight: 750; font-size: 13px; }
.nav-upload span { font: 700 17px/1 var(--body); }
.nav-upload:hover, .primary:hover { background: #ff845f; }
.hero { position: relative; isolation: isolate; overflow: hidden; background: #252925; color: white; }
.hero-photo { position: absolute; inset: 0; z-index: -2; background-image: url("/images/garage.webp"); background-position: center 56%; background-size: cover; background-repeat: no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(13 16 15 / 88%), rgb(13 16 15 / 68%) 25%, rgb(13 16 15 / 19%) 52%, transparent 72%), linear-gradient(0deg, rgb(13 15 13 / 28%), transparent 45%); }
.hero-inner { min-height: clamp(415px, 35vw, 505px); padding-block: clamp(39px, 4.1vw, 63px); display: flex; align-items: center; }
.hero-copy { width: fit-content; }
.kicker { font-size: 12px; letter-spacing: .12em; font-weight: 700; color: #f0efe9; line-height: 1.4; display: flex; align-items: center; gap: 8px; }
.signal { width: 21px; height: 4px; background: var(--accent); transform: skew(-28deg); }
.hero h1 { margin: 19px 0 15px -5px; width: fit-content; font-family: var(--display); font-size: clamp(84px, 7.25vw, 115px); font-weight: 1000; font-style: italic; letter-spacing: -.056em; line-height: .77; transform: skew(-3deg); }
.hero h1 span { color: var(--accent); }
.hero-description { color: #eeeee8; font-size: clamp(14px, 1.2vw, 17px); letter-spacing: .022em; margin: 24px 0 20px; text-wrap: pretty; }
.button { display: inline-flex; align-items: center; gap: 23px; justify-content: center; min-height: 42px; text-decoration: none; border: 0; border-radius: 2px; padding: 9px 18px; font-size: 14px; font-weight: 750; line-height: 1.5; }
.button span { font-family: Arial, sans-serif; font-size: 18px; line-height: 1; }
.primary { background: var(--accent); color: var(--ink); }
.library { padding-block: 43px 54px; scroll-margin-top: 12px; }
.catalogue-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.catalogue-top h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(27px, 2.45vw, 36px); font-weight: 850; line-height: 1.2; letter-spacing: -.04em; }
.catalogue-top h2::before { content: ""; width: 6px; height: .87em; transform: skew(-15deg); background: var(--accent); }
.search-field { display: flex; align-items: center; gap: 12px; width: min(275px, 52%); min-height: 42px; padding: 7px 13px; border: 1px solid #bdbeb6; border-radius: 2px; background: var(--surface); }
.search-field:focus-within { outline: 2px solid #2471bc; outline-offset: 1px; }
.search-field input { border: 0; background: transparent; min-width: 0; width: 100%; padding: 0; color: var(--ink); font-size: 14px; }
.search-field input:focus-visible { outline: none; }
input::placeholder, textarea::placeholder { color: #686a63; opacity: 1; }
.glass { display: block; position: relative; width: 13px; height: 13px; flex: 0 0 13px; border: 1.6px solid #62645b; border-radius: 50%; }
.glass::after { content: ""; width: 6px; height: 1.6px; background: #62645b; position: absolute; right: -4px; bottom: -2px; transform: rotate(45deg); }
.library-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, 29%); align-items: start; gap: clamp(22px, 3.15vw, 46px); }
.filters, .category-choice { border: 0; padding: 0; margin: 0; display: flex; }
.filters { gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
.filters label, .category-choice label { position: relative; display: inline-flex; }
.filters input, .category-choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.filters span, .category-choice label span { display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 650; }
.filters span { min-width: 57px; min-height: 36px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
.filters input:checked + span, .category-choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters input:focus-visible + span, .category-choice input:focus-visible + span { outline: 2px solid #2471bc; outline-offset: 3px; }
.guide { position: relative; border-top: 3px solid var(--ink); padding: 18px 20px 14px; background: #eae9e2; scroll-margin: 20px; }
.guide-top { display: flex; align-items: baseline; gap: 7px; }
.guide-icon { color: var(--accent-ink); font: bold 20px/1 Arial, sans-serif; }
.guide h3 { font-size: 18px; line-height: 1.35; letter-spacing: -.03em; }
.guide p { color: #4f514a; font-size: 13px; margin: 9px 0 13px; }
.guide dl > div { border-top: 1px solid #c9c9bf; padding: 10px 0 4px; margin-top: 5px; }
.guide dt { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 740; }
.guide dt span { color: #5a5c54; font: 600 10px/1.4 ui-monospace, monospace; }
.guide dd { margin-top: 2px; font-size: 13px; color: #3e4039; }
.guide dd span { color: #6b6d62; }
.empty, .loading { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 24px 16px; color: var(--muted); }
.empty h3 { font-size: 17px; color: var(--ink); }
.empty p { font-size: 13px; }
.folder-symbol { display: block; position: relative; width: 32px; height: 23px; border: 2px solid #817f73; border-radius: 2px; margin: 4px 0 10px; }
.folder-symbol::before { content: ""; position: absolute; left: -2px; top: -7px; width: 15px; height: 5px; border: 2px solid #817f73; border-bottom: 0; border-radius: 2px 2px 0 0; background: var(--paper); }
.empty button, .report-link { background: transparent; border: 0; color: var(--accent-ink); font-size: 13px; font-weight: 700; padding: 5px 3px; text-underline-offset: .2em; }
.empty button:hover, .report-link:hover { text-decoration: underline; }
.mod-list { display: grid; gap: 10px; padding-top: 15px; }
.mod-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.mod-card h3 { font-weight: 750; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.mod-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; font-size: 12px; color: var(--muted); margin-bottom: 7px; overflow-wrap: anywhere; }
.category-tag { color: var(--accent-ink); font-weight: 750; }
.mod-description { color: #45483f; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; margin-top: 6px; }
.mod-actions { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.download { background: var(--ink); color: #fff; min-height: 38px; gap: 12px; font-size: 13px; }
.download:hover { background: #41443b; }
.report-link { color: var(--muted); font-size: 11px; }
.notice { background: #e8eede; border-left: 3px solid #50753b; color: #274225; padding: 8px 11px; margin-top: 12px; font-size: 14px; }
footer { border-top: 1px solid var(--line); padding: 22px 0; }
.foot-inner { display: flex; align-items: center; gap: 25px; }
.foot-brand { font-size: 24px; gap: 7px; }
.foot-brand .brand-mark { transform: skew(-24deg) scale(.74); transform-origin: left; margin-right: -7px; }
footer p { color: var(--muted); font-size: 12px; max-width: 64ch; }
.text-button { border: 0; background: transparent; padding: 5px 1px; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; margin-left: auto; }
footer .text-button:hover { color: var(--accent-ink); }
dialog { border: 1px solid #aeafa5; padding: 0; color: var(--ink); background: var(--surface); width: min(calc(100% - 28px), 490px); max-height: calc(100dvh - 36px); border-radius: 3px; }
dialog::backdrop { background: rgb(18 20 17 / 75%); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-body { display: grid; gap: 14px; padding: clamp(18px, 4vw, 28px); }
.dialog-heading { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.dialog-heading h2 { font-size: 25px; line-height: 1.3; letter-spacing: -.04em; }
.dialog-intro { color: var(--muted); font-size: 14px; }
.close { display: grid; place-items: center; background: transparent; color: var(--ink); border: 1px solid var(--line); width: 32px; height: 32px; padding: 0; font: 24px/1 Arial, sans-serif; }
.category-choice { gap: 5px; }
.category-choice legend, .field, .file-field, .check-row { font-size: 14px; }
.category-choice legend { margin-bottom: 4px; font-weight: 650; }
.category-choice label span { border: 1px solid #a8aaa0; border-radius: 2px; width: 70px; min-height: 35px; }
.file-field { display: grid; position: relative; justify-items: center; border: 1px dashed #999b8e; padding: 13px; gap: 3px; background: var(--paper); border-radius: 2px; text-align: center; cursor: pointer; }
.file-field:focus-within { outline: 2px solid #2471bc; outline-offset: 2px; }
.file-field.dragging { border-color: var(--accent-ink); background: #ffeadc; }
.file-field input { cursor: pointer; opacity: 0; position: absolute; width: 100%; height: 100%; inset: 0; }
.file-field strong { overflow-wrap: anywhere; width: 100%; }
.file-symbol { font: 23px/1.25 Arial, sans-serif; color: var(--accent-ink); }
#file-hint { font-size: 12px; line-height: 1.4; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: block; min-width: 0; font-weight: 650; }
.field input, .field textarea, .field select { display: block; width: 100%; min-width: 0; background: white; border: 1px solid #a8aaa0; margin-top: 4px; padding: 8px 10px; border-radius: 2px; font-size: 15px; font-weight: 400; color: var(--ink); }
.field textarea { resize: vertical; }
.optional { font-size: 12px; color: var(--muted); font-weight: 400; }
.check-row { display: flex; align-items: flex-start; gap: 9px; }
.check-row input { flex: 0 0 auto; accent-color: var(--accent-ink); width: 16px; height: 16px; margin: 3px 0; }
.form-status { font-size: 14px; color: var(--accent-ink); overflow-wrap: anywhere; }
.form-status:empty { display: none; }
.submit { justify-self: end; min-width: 136px; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .nav-inner { min-height: 57px; }
  nav { gap: 14px; }
  .brand { font-size: 28px; }
  .nav-link { font-size: 12px; }
  .nav-upload { padding: 7px 11px; }
  .hero-inner { min-height: 385px; padding-block: 33px; align-items: flex-end; }
  .hero-photo { background-position: 62% 50%; }
  .hero::before { background: linear-gradient(90deg, rgb(14 16 14 / 78%), rgb(14 16 14 / 53%) 35%, rgb(14 16 14 / 11%) 76%), linear-gradient(0deg, rgb(12 13 12 / 59%), transparent 65%); }
  .hero h1 { font-size: clamp(70px, 13.5vw, 90px); }
  .hero-description { max-width: 24em; }
  .library { padding-block: 31px 33px; }
  .library-layout { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .guide { padding: 16px 17px; }
  .guide dl { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .empty, .loading { min-height: 164px; }
  .foot-inner { flex-wrap: wrap; gap: 10px 14px; }
  .foot-brand { font-size: 22px; }
  footer p { order: 3; max-width: 100%; width: 100%; }
}
@media (max-width: 440px) {
  nav .nav-link:first-child { display: none; }
  .hero-inner { min-height: 365px; }
  .hero-photo { background-position: 64% 50%; }
  .hero-description { max-width: 19em; font-size: 13px; }
  .catalogue-top { margin-bottom: 18px; gap: 10px; }
  .catalogue-top h2 { gap: 7px; font-size: 26px; white-space: nowrap; }
  .search-field { width: 52%; min-height: 38px; padding: 6px 10px; }
  .search-field input { font-size: 13px; }
  .mod-card { padding: 12px; gap: 8px; }
  .mod-card h3 { font-size: 17px; }
  .mod-card .meta { gap: 3px 7px; }
  .mod-actions .button { padding-inline: 12px; }
  .field input, .field select, .field textarea, .search-field input { font-size: 16px; }
  .guide dl { gap: 10px; }
}
@media (max-width: 350px) {
  .wrap { width: calc(100% - 24px); }
  .field-row, .guide dl { grid-template-columns: 1fr; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.mod-card { grid-template-columns: 48px minmax(0, 1fr) auto; }
.mod-icon { position: relative; display: block; width: 46px; height: 46px; border: 1px solid #dbd8cb; background: #efebe0; color: #6c6554; }
.mod-icon::before, .mod-icon::after { content: ""; position: absolute; }
.car-icon::before { width: 25px; height: 8px; border: 2px solid currentColor; border-radius: 5px 5px 3px 3px; bottom: 13px; left: 8px; }
.car-icon::after { width: 15px; height: 7px; border: 2px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; bottom: 24px; left: 13px; }
.map-icon { background: #e7ede5; border-color: #d2d9cf; color: #556750; }
.map-icon::before { width: 21px; height: 17px; border: 2px solid currentColor; left: 10px; top: 12px; transform: skewY(-12deg); }
.map-icon::after { width: 5px; height: 17px; border-right: 1px solid currentColor; border-left: 1px solid currentColor; left: 19px; top: 15px; transform: skewY(-12deg); }
.more-button { display: block; margin: 16px auto 0; padding: 7px 14px; border-radius: 2px; color: var(--ink); background: var(--surface); border: 1px solid #a8aaa0; font-size: 13px; }
@media (max-width: 540px) {
  .mod-card { grid-template-columns: minmax(0, 1fr) auto; }
  .mod-icon { display: none; }
}
.account-nav { background: transparent; color: #f4f3ec; border: 0; padding: 6px 0; font: 650 13px/1.5 var(--body); }
.account-nav:hover { color: var(--accent); }
.artist-credit { min-width: 0; font-size: 14px; font-weight: 650; }
.artist-credit strong { display: block; margin-top: 4px; border: 1px solid var(--line); background: var(--paper); padding: 8px 10px; font-size: 15px; overflow-wrap: anywhere; }
.manage-toolbar, .manage-controls { display: flex; align-items: center; gap: 7px; }
.manage-toolbar { justify-content: space-between; }
.line-button { color: var(--ink); padding: 6px 10px; background: transparent; border: 1px solid #9e9f96; border-radius: 2px; font-weight: 650; font-size: 13px; }
.line-button:hover { background: var(--paper); }
.line-button.remove { color: #992710; }
.manage-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.manage-item h3 { font-size: 16px; overflow-wrap: anywhere; }
.manage-item p { color: var(--muted); font-size: 13px; }
.manage-controls { flex-shrink: 0; }
.manage-empty { margin-block: 8px; }
.danger { color: white; background: #a82e15; }
@media (max-width: 570px) {
  nav .nav-link { display: none; }
  .nav-inner { gap: 10px; }
}
.field-help { font-size: 12px; color: var(--muted); margin-top: -9px; }
