:root {
  color-scheme: dark;
  --night: #101116;
  --panel: #191b22;
  --line: rgba(255, 255, 255, .12);
  --ink: #fff;
  --muted: #a8a9b1;
  --red: #ef2732;
  --parchment: #f0e2c2;
  --parchment-edge: #b29158;
  --parchment-ink: #261d18;
  font-family: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--night); }
body { margin: 0; color: var(--ink); background: var(--night); }
a { color: inherit; text-decoration: none; }
.upload-header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(6vw, calc((100vw - 1220px) / 2)); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid #ffffff36; border-radius: 10px; background: linear-gradient(145deg, #ff3542, #b9000b); font-size: 11px; }
.brand-name { display: grid; gap: 4px; }
.brand-name strong { font-size: 14px; font-style: italic; letter-spacing: 1.2px; }
.brand-name small { color: #b6a58b; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.header-link { display: flex; min-height: 44px; align-items: center; padding: 0 10px; border-radius: 4px; color: #f0e2c2; font-size: 13px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.header-link span { margin-left: 6px; color: var(--red); }
.header-link:focus-visible { outline: 2px solid #f0e2c2; outline-offset: 3px; }
.upload-hero { display: grid; width: min(560px, calc(100% - 48px)); grid-template-columns: minmax(0, 1fr); align-items: center; margin: 0 auto; padding: 72px 0 34px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #bfc0c6; font-size: 9px; font-weight: 800; letter-spacing: 1.3px; }
.eyebrow i { width: 18px; height: 2px; background: var(--red); }
.upload-card { position: relative; padding: clamp(26px, 5vw, 38px); border: 1px solid var(--parchment-edge); border-radius: 7px; background: linear-gradient(155deg, #f5ebd2, var(--parchment) 55%, #e3d0a8); color: var(--parchment-ink); box-shadow: 0 24px 75px #000b, inset 0 0 0 5px rgba(255, 255, 255, .25), inset 0 0 0 6px rgba(116, 22, 28, .55); }
.upload-card::before, .upload-card::after { position: absolute; right: 12px; left: 12px; height: 9px; border: 1px solid #9a1d26; border-radius: 7px; background: linear-gradient(#bd3037, #71141a); box-shadow: 0 3px 8px #0007; content: ""; pointer-events: none; }
.upload-card::before { top: -5px; }
.upload-card::after { bottom: -5px; }
.list-loading-modal { width: min(390px, calc(100% - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 32px 28px; border: 1px solid #b29158; border-radius: 16px; background: linear-gradient(150deg, #f5ebd2, #e8d7b5); color: #2b1d16; text-align: center; box-shadow: 0 24px 70px #000c; }
.list-loading-modal::backdrop { background: #08090dcc; }
.list-loading-modal h2 { margin: 19px 0 8px; font-size: 20px; letter-spacing: -.4px; }
.list-loading-modal p { margin: 0; color: #594732; font-size: 12px; line-height: 1.6; }
.loading-modal-secondary, .close-app-button { width: 100%; border-color: #8c7654; background: #e3d0a8; color: #35271d; }
.loading-modal-secondary { margin-top: 16px; }
.loading-modal-secondary:hover, .close-app-button:hover { background: #d7c092; }
.close-app-button { margin-top: 20px; }
.loading-clock { position: relative; width: 62px; height: 62px; margin: 0 auto; border: 3px solid #9a1d26; border-radius: 50%; box-shadow: 0 5px 16px #2b1d1630, inset 0 0 8px #9a1d2618; animation: clock-pulse 1.5s ease-in-out infinite; }
.loading-clock::before, .loading-clock::after, .loading-clock span { position: absolute; top: 50%; left: 50%; display: block; width: 2px; border-radius: 2px; background: #71141a; content: ""; transform-origin: 50% 100%; }
.loading-clock::before { height: 17px; margin: -17px 0 0 -1px; animation: clock-hand 3s linear infinite; }
.loading-clock::after { height: 12px; margin: -12px 0 0 -1px; animation: clock-hand 12s linear infinite; }
.loading-clock span { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #fff; }
@keyframes clock-hand { to { transform: rotate(360deg); } }
@keyframes clock-pulse { 50% { box-shadow: 0 7px 19px #2b1d1640, inset 0 0 10px #9a1d2622; } }
@media (prefers-reduced-motion: reduce) { .loading-clock, .loading-clock::before, .loading-clock::after { animation-duration: 10s; } }
.card-heading { display: flex; align-items: center; gap: 12px; }
.card-heading h2 { margin: 0; color: #2b1d16; font-size: clamp(24px, 4vw, 31px); letter-spacing: .01em; }
.card-icon { display: block; width: 38px; height: 38px; flex: 0 0 auto; border: 2px solid #76171e; border-radius: 50%; background: radial-gradient(circle, #f5ebd2 0 35%, #ae2029 39% 68%, #74171e 72%); box-shadow: 0 0 0 3px #dfc99e; }
.card-intro { margin: 20px 0 22px; color: #50402f; font-size: 14px; line-height: 1.6; }
form { display: grid; gap: 8px; }
label { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: #35271d; font-size: 13px; font-weight: 750; }
label span { color: #6c5640; font-size: 11px; font-weight: 600; }
input { width: 100%; min-height: 50px; padding: 10px 12px; border: 1px solid #8c7654; border-radius: 5px; outline: none; background: #fff9e9; color: #241a13; font: inherit; font-size: 16px; }
input::placeholder { color: #776b57; }
input:focus { border-color: #9d1c24; box-shadow: 0 0 0 3px #ef273240; }
.privacy-note { display: flex; gap: 9px; margin-top: 9px; padding: 11px; border: 1px solid #ffffff12; border-radius: 7px; background: #ffffff04; }
.privacy-note > span { font-size: 13px; }
.privacy-note p { display: grid; gap: 5px; margin: 0; }
.privacy-note strong { font-size: 11px; }
.privacy-note small { color: #a6a7af; font-size: 9px; line-height: 1.55; }
.upload-status { min-height: 17px; margin: 4px 0 0; color: #594732; font-size: 12px; line-height: 1.5; }
.upload-status[data-state="error"] { color: #8e1119; }
.upload-status[data-state="success"] { color: #17613a; }
.submit-button { display: flex; min-height: 50px; align-items: center; justify-content: center; gap: 10px; border: 1px solid #81151d; border-radius: 5px; background: linear-gradient(135deg, #d52b33, #8e1119); color: #fff7e8; font-size: 14px; font-weight: 800; cursor: pointer; }
.submit-button span { font-size: 19px; }
.submit-button:disabled { cursor: wait; opacity: .58; }
.submit-button:focus-visible { outline: 3px solid #6d1017; outline-offset: 3px; }
.management-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 14px; }
.management-heading .eyebrow { margin: 0 0 6px; color: #95e3bf; font-size: 8px; }
.management-heading h3 { margin: 0; font-size: 16px; }
.upload-hero.management-open { display: block; width: min(1320px, calc(100% - 40px)); padding-top: 46px; }
.management-open .upload-card { width: 100%; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(150deg, rgba(34, 35, 43, .98), rgba(18, 19, 24, .98)); color: var(--ink); box-shadow: 0 24px 75px #0008, inset 0 1px #ffffff0b; }
.management-open .upload-card::before, .management-open .upload-card::after { display: none; }
.management-open .card-heading h2 { color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: clamp(26px, 3vw, 38px); }
.management-open .card-intro { color: #aaaab2; }
.management-open label { color: #eee; }
.management-open label span { color: #aaaab2; }
.management-open input, .management-open textarea { border-color: #ffffff21; background: #101116; color: #fff; }
.text-button { padding: 7px 0; border: 0; background: none; color: #bbbcc4; font: inherit; font-size: 9px; text-decoration: underline; cursor: pointer; }
.table-frame { overflow-x: auto; border: 1px solid #c5b88f55; border-radius: 9px; background: #121b1c; box-shadow: 0 14px 36px #0005, inset 0 0 24px #a8d9d208; }
.mac-lists-table { width: 100%; border-collapse: collapse; color: #d9e9d5; font: 12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; text-align: left; }
.mac-lists-table th { padding: 13px 15px; border-bottom: 1px solid #b7aa7a55; background: linear-gradient(#293a37, #1c2b29); color: #f0d58a; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.mac-lists-table td { padding: 14px 15px; border-bottom: 1px solid #c5b88f1e; vertical-align: middle; }
.mac-lists-table tbody tr:nth-child(even) { background: #c6e7d107; }
.mac-lists-table tbody tr:last-child td { border-bottom: 0; }
.mac-lists-table tbody tr:hover { background: #d4bd7120; }
.table-list-name { min-width: 150px; }
.table-list-name h4 { margin: 0; color: #fff0bd; font-size: 13px; overflow-wrap: anywhere; }
.table-description { min-width: 160px; max-width: 320px; color: #a9c0ad; overflow-wrap: anywhere; }
.table-source { min-width: 130px; }
.table-source small { display: block; margin-top: 6px; color: #8da69b; font-size: 10px; overflow-wrap: anywhere; }
.retro-tag { display: inline-flex; align-items: center; width: fit-content; padding: 3px 7px; border: 1px solid #dbc17570; border-radius: 4px; background: #c69e3314; color: #e4cb82; font-size: 9px; font-weight: 800; letter-spacing: .07em; }
.status-badge { display: inline-block; padding: 5px 8px; border: 1px solid; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.status-ready { border-color: #73d3a24c; background: #4da6751c; color: #92e4ae; }
.status-processing { border-color: #e0bb5f55; background: #b98e2a1d; color: #f0d58a; }
.status-error { border-color: #ef697255; background: #b22f3824; color: #ff9ca2; }
.table-actions { min-width: 170px; white-space: nowrap; }
.table-actions button { min-height: 34px; margin: 2px 4px 2px 0; padding: 0 10px; border: 1px solid #7eb49b4d; border-radius: 5px; background: #7eb49b12; color: #bce4cf; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.table-actions .delete-list-button { border-color: #ef697255; background: #b22f3824; color: #ff9ca2; }
.table-actions button:disabled { cursor: wait; opacity: .55; }
.list-error { margin: 7px 0 0; color: #ff9ca2; font: 10px/1.4 Arial,sans-serif; }
.edit-list-form { display: grid; max-width: 760px; gap: 10px; margin: 20px auto 8px; padding: clamp(18px, 3vw, 28px); border: 1px solid #d1b86770; border-radius: 10px; background: linear-gradient(145deg, #273632, #17211f 65%); box-shadow: 0 16px 38px #0005, inset 0 1px #fff1; }
.edit-list-form[hidden] { display: none; }
.edit-form-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.edit-list-form label { margin-top: 3px; color: #e9e1c9; font-size: 11px; }
.edit-list-form input, .edit-list-form textarea { border-color: #b6a4664d; background: #111a18; color: #f3efd9; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.edit-list-form textarea { width: 100%; min-height: 78px; resize: vertical; padding: 11px 12px; border: 1px solid #ffffff21; border-radius: 7px; outline: none; font-size: 11px; line-height: 1.5; }
.edit-list-form textarea:focus { border-color: #cdb45d; box-shadow: 0 0 0 3px #cdb45d20; }
.edit-url-note { margin: 0; color: #a9c0ad; font-size: 10px; line-height: 1.5; }
.empty-state { margin: 0; padding: 14px; border: 1px dashed #ffffff2a; border-radius: 8px; color: #aaaab2; font-size: 10px; line-height: 1.6; text-align: center; }
.add-list-action { display: flex; width: 100%; min-height: 76px; align-items: center; gap: 15px; margin-top: 18px; padding: 14px 18px; border: 1px solid #6de49b; border-radius: 10px; background: linear-gradient(115deg, #14783f, #1caa59 58%, #168343); color: #f2fff6; text-align: left; cursor: pointer; box-shadow: 0 0 0 1px #54d88730, 0 8px 26px #0a9e4938, inset 0 1px #ffffff35; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.add-list-action:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 0 0 1px #7df0aa66, 0 12px 32px #0a9e495c, inset 0 1px #ffffff4a; }
.add-list-action:focus-visible { outline: 3px solid #baffce; outline-offset: 3px; }
.add-list-action[hidden] { display: none; }
.add-list-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid #ffffff65; border-radius: 50%; background: #ffffff22; font-size: 27px; font-weight: 400; line-height: 1; }
.add-list-copy { display: grid; flex: 1; gap: 5px; }
.add-list-copy strong { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.add-list-copy small { color: #e0ffe9; font-size: 11px; line-height: 1.4; }
.add-list-arrow { font-size: 28px; line-height: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.add-list-details { margin-top: 0; }
.add-list-details form { margin-top: 14px; }
.help-section { position: relative; width: min(820px, calc(100% - 48px)); margin: 12px auto 68px; padding: 28px clamp(22px, 5vw, 42px); border: 1px solid var(--parchment-edge); border-radius: 4px; background: linear-gradient(155deg, #f4e8cc, #e6d3ac); color: var(--parchment-ink); box-shadow: 0 18px 55px #0009, inset 0 0 0 4px rgba(255, 255, 255, .25), inset 0 0 0 5px rgba(116, 22, 28, .45); }
.help-section h2 { margin: 0; color: #2b1d16; font-size: clamp(24px, 4vw, 34px); letter-spacing: .01em; }
.manual-intro { margin: 10px 0 18px; color: #594732; font-size: 14px; line-height: 1.6; }
.tutorial-steps { display: grid; margin: 0; padding: 0; list-style: none; }
.tutorial-steps li { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 14px; padding: 16px 0; border-top: 1px solid #725a382c; }
.step-number { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #72141b; border-radius: 50%; background: #a91f27; color: #fff5e0; font-size: 11px; font-weight: 800; }
.tutorial-steps h3 { margin: 0 0 5px; color: #35271d; font-size: 16px; }
.tutorial-steps p, .manual-note { margin: 0; color: #594732; font-size: 13px; line-height: 1.6; }
.manual-note { padding-top: 14px; border-top: 1px solid #725a382c; }
@media (max-width: 800px) {
  .upload-hero { width: min(560px, calc(100% - 32px)); padding: 52px 0 28px; }
  .upload-hero.management-open { width: calc(100% - 24px); padding-top: 22px; }
  .upload-card { padding: 23px; }
  .help-section { width: calc(100% - 32px); margin-bottom: 48px; }
}
@media (max-width: 480px) {
  .upload-header { min-height: 62px; padding: 0 15px; }
  .brand-name small { font-size: 11px; }
  .header-link { font-size: 11px; }
  .upload-hero { width: min(100% - 24px, 440px); padding: 34px 0 24px; }
  .upload-hero.management-open { width: calc(100% - 16px); padding-top: 12px; }
  .upload-card, .management-open .upload-card { padding: 18px 15px; border-radius: 16px; }
  .card-heading h2 { font-size: 23px; }
  .card-intro { margin: 12px 0 16px; font-size: 12px; }
  form { gap: 7px; }
  label { margin-top: 8px; font-size: 13px; }
  input { min-height: 48px; padding: 12px; border-radius: 10px; font-size: 16px; }
  .submit-button { min-height: 50px; border-radius: 8px; font-size: 14px; }
  .edit-list-form { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; margin: 14px 0 8px; padding: 16px 13px; border-radius: 14px; }
  .edit-list-form textarea { min-height: 86px; font-size: 16px; }
  .add-list-details form { margin-top: 10px; }
  .add-list-details textarea { min-height: 74px; padding: 12px; border-radius: 10px; font-size: 16px; }
  .list-loading-modal { width: calc(100% - 28px); max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); padding: 26px 20px; border-radius: 18px; }
  .list-loading-modal h2 { font-size: 19px; }
  .mac-lists-table th, .mac-lists-table td { padding: 10px 9px; }
  .table-actions { white-space: normal; }
  .table-actions button { min-height: 42px; margin: 3px 2px; padding: 0 9px; }
  .help-section { width: calc(100% - 24px); padding: 23px 18px; }
}
@media (max-width: 600px) {
  .management-heading { align-items: flex-start; }
  .table-frame { overflow: visible; margin-right: 0; border: 0; background: transparent; box-shadow: none; }
  .mac-lists-table, .mac-lists-table tbody { display: grid; width: 100%; min-width: 0; gap: 10px; }
  .mac-lists-table thead { display: none; }
  .mac-lists-table tbody tr { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(150deg, #22242c, #17181e); }
  .mac-lists-table tbody td { display: grid; grid-template-columns: minmax(70px, .35fr) minmax(0, 1fr); gap: 10px; padding: 10px 11px; border-bottom: 1px solid #ffffff10; overflow-wrap: anywhere; }
  .mac-lists-table tbody td::before { align-self: start; color: #9ea0aa; content: attr(data-label); font: 700 9px/1.45 Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
  .mac-lists-table tbody td.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .mac-lists-table tbody td.table-actions::before { flex: 0 0 100%; }
  .mac-lists-table tbody td.table-actions button { flex: 1 1 auto; }
  .mac-lists-table tbody td:last-child { border-bottom: 0; }
  .table-list-name, .table-description, .table-source, .table-actions { min-width: 0; max-width: none; }
  .table-source small { overflow-wrap: anywhere; }
}

html.native-app, html.native-app body { min-height: 100%; background: var(--night); }
html.native-app body { min-height: 100dvh; }
html.native-app .upload-header { position: sticky; top: 0; z-index: 5; min-height: 58px; padding: 0 16px; border-bottom-color: var(--line); background: rgba(16,17,22,.96); }
html.native-app .header-link, html.native-app .help-section { display: none; }
html.native-app .upload-hero, html.native-app .upload-hero.management-open { display: block; width: 100%; max-width: none; margin: 0; padding: 12px; }
html.native-app .upload-card, html.native-app .management-open .upload-card { width: 100%; padding: 18px 14px; border: 0; border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; }
html.native-app .upload-card::before, html.native-app .upload-card::after { display: none; }
html.native-app .card-heading h2 { color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
html.native-app .card-icon { display: none; }
html.native-app label { color: var(--ink); }
html.native-app input, html.native-app textarea { border-color: #ffffff21; background: #101116; color: #fff; }
html.native-app .card-intro { margin: 12px 0 16px; font-size: 12px; }
html.native-app .management-open .card-heading h2 { font-size: 26px; }
html.native-app .management-heading { position: sticky; top: 0; z-index: 2; padding: 10px 0; background: var(--night); }
