/* PinSpot — its own look: evening plum, sunset coral, warm cream. Barlow type, 8px corners, big type. */
:root {
  --page: #FFFBF7; --wash: #F6EEF8; --card: #FFFFFF; --ink: #2A1638; --muted: #6B5577; --rule: #E4D4EA;
  --band1: #7B3FA0; --band2: #4E2272; --band3: #2C1245; --btn1: #8A44B5; --btn2: #5E2A86; --link: #6E2FA0;
  --sun: #FF7A59; --pick: #FFE3D8; --leaf: #23875C; --warn: #B3261E; --shadow: rgba(42, 22, 56, .10);
  --field: #FFFFFF; --scrim: rgba(20, 8, 30, .6);
  --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  color-scheme: light;
}
@media (min-width: 601px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }
@media (min-width: 1920px) { :root { --gutter: 64px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #170D21; --wash: #22142F; --card: #2E1C3F; --ink: #F5EEF9; --muted: #C9B5D4; --rule: #4A3360;
    --link: #DDB0F7; --pick: #5C2C20; --shadow: rgba(0, 0, 0, .4); --field: #22142F; --warn: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #170D21; --wash: #22142F; --card: #2E1C3F; --ink: #F5EEF9; --muted: #C9B5D4; --rule: #4A3360;
  --link: #DDB0F7; --pick: #5C2C20; --shadow: rgba(0, 0, 0, .4); --field: #22142F; --warn: #FF8A80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--text); font-size: 1.125rem; line-height: 1.55; }
@media (min-width: 1024px) { body { font-size: 1.25rem; } }
h1, h2, h3, h4 { text-wrap: balance; }
a { color: var(--link); }
.nw { white-space: nowrap; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 2400px; margin: 0 auto; padding-inline: var(--gutter); }

/* Header */
.bar { background: linear-gradient(135deg, var(--band1) 0%, var(--band2) 55%, var(--band3) 100%); color: #FFFFFF; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; min-height: 76px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--cond); font-weight: 700; font-size: 2.25rem; line-height: 1;
  letter-spacing: .01em; text-shadow: 0 2px 0 rgba(0, 0, 0, .16); }
.bar .btn { white-space: nowrap; flex: 0 0 auto; }
.bar .short { display: none; }
@media (max-width: 459px) { .bar .long { display: none; } .bar .short { display: inline; } }
.brand svg { width: 34px; height: 34px; flex: 0 0 auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 8px;
  font: 700 1.125rem/1.2 var(--text); text-decoration: none; cursor: pointer; border: 2px solid transparent; text-align: center; }
.go { background: linear-gradient(180deg, var(--btn1) 0%, var(--btn2) 100%); color: #FFFFFF; border: 0;
  box-shadow: 0 6px 14px rgba(94, 42, 134, .30), inset 0 1px 0 rgba(255, 255, 255, .28); }
.sun { background: var(--sun); color: #2A1638; border: 0; box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }
.see { background: var(--card); color: var(--link); border-color: var(--rule); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 22px; height: 22px; flex: 0 0 auto; }
.tog { background: var(--card); color: var(--ink); border-color: var(--rule); }
.tog[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: #FFFFFF; }

/* Filter row */
.filters { display: flex; gap: 12px; padding-block: 16px; border-bottom: 1px solid var(--rule); background: var(--wash); }
.filters .wrap { display: flex; gap: 12px; }
.filters .tog { flex: 1 1 0; }
@media (min-width: 700px) { .filters .tog { flex: 0 0 auto; min-width: 190px; } }

/* Board */
main { padding-bottom: 96px; }
.sec { margin-top: 28px; }
.sec h2 { margin: 0 0 14px; font-family: var(--cond); font-weight: 700; font-size: 2.1rem; line-height: 1.05; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; }
.sec h2 .sub { font-family: var(--text); font-weight: 600; font-size: 1.0625rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 1900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid > .card:last-child:nth-child(odd) { grid-column: auto; }
  .grid > .card:last-child:nth-child(3n+1) { grid-column: 1 / -1; } }

.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 22px var(--shadow); cursor: pointer; min-width: 0; }
.card:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.pic { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--band1), var(--band3)); overflow: hidden; flex: 0 0 auto; }
.pic img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; background: var(--wash); }
.pic .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #FFFFFF;
  font-family: var(--cond); font-weight: 700; line-height: 1; text-align: center; }
.pic .ph b { font-size: 1.6rem; letter-spacing: .08em; }
.pic .ph strong { font-size: 4rem; }
.body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1 1 auto; min-width: 0; }
.when { margin: 0; font-weight: 700; color: var(--link); font-size: 1.0625rem; text-transform: uppercase; letter-spacing: .04em; }
.title { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 2rem; line-height: 1.05; overflow-wrap: anywhere; }
.time { margin: 0; font-size: 1.25rem; }
.time .end { font-weight: 700; background: var(--pick); padding: 0 6px; border-radius: 4px; }
.where, .price { margin: 0; color: var(--muted); }
.plan-chip { align-self: flex-start; font-weight: 700; font-size: 1.0625rem; color: #FFFFFF; background: var(--leaf); border-radius: 6px; padding: 2px 10px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 12px; }
.reading { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; }
.spin { width: 26px; height: 26px; border: 4px solid var(--rule); border-top-color: var(--btn1); border-radius: 50%; animation: spin 1s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { margin: 0; color: var(--warn); font-style: italic; }
@media (min-width: 700px) and (max-width: 1099px) {
  .card { flex-direction: row; }
  .card .pic { width: 40%; aspect-ratio: auto; min-height: 240px; }
}
@media (min-width: 1100px) {
  .grid > .card:last-child:nth-child(odd) { flex-direction: row; }
  .grid > .card:last-child:nth-child(odd) .pic { width: 45%; aspect-ratio: auto; min-height: 280px; }
}
@media (min-width: 1900px) {
  .grid > .card:last-child:nth-child(odd) { flex-direction: column; }
  .grid > .card:last-child:nth-child(odd) .pic { width: auto; aspect-ratio: 16 / 9; min-height: 0; }
  .grid > .card:last-child:nth-child(3n+1) { flex-direction: row; }
  .grid > .card:last-child:nth-child(3n+1) .pic { width: 40%; aspect-ratio: auto; min-height: 300px; }
}

.empty { margin-top: 40px; padding: 32px; background: var(--wash); border: 1px solid var(--rule); border-radius: 8px; text-align: center; }
.empty h2 { margin: 0 0 8px; font-family: var(--cond); font-size: 2.2rem; }
.empty p { margin: 0 0 20px; }
.past-row { margin-top: 32px; }
.past-row .btn { width: 100%; }

/* Sheets (add, details) */
dialog { border: 0; padding: 0; background: var(--page); color: var(--ink); width: min(100% - 2 * var(--gutter), 1100px); max-height: calc(100dvh - 48px);
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
dialog::backdrop { background: var(--scrim); }
@media (max-width: 699px) { dialog { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; } }
.sheet { display: flex; flex-direction: column; max-height: inherit; height: 100%; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter); background: var(--wash); border-bottom: 1px solid var(--rule); }
.sheet-head h2 { margin: 0; font-family: var(--cond); font-size: 2rem; line-height: 1.1; }
.x { width: 48px; height: 48px; flex: 0 0 auto; border: 0; border-radius: 8px; background: var(--card); color: var(--ink); font-size: 1.9rem; line-height: 1; cursor: pointer; }
.sheet-body { padding: 20px var(--gutter) 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.sheet-body > * { flex-shrink: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.field input, .field textarea { width: 100%; min-height: 52px; padding: 10px 14px; border: 2px solid var(--rule); border-radius: 8px; background: var(--field);
  color: var(--ink); font: 400 1.125rem/1.4 var(--text); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--btn1); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.two > * { min-width: 0; }
.field input { min-width: 0; }
.shot-prev { position: relative; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--wash); }
.shot-prev img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.shot-prev .x { position: absolute; top: 8px; right: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.drop { border: 3px dashed var(--btn1) !important; }
.wide { width: 100%; }

/* Details */
.d-pic { border-radius: 8px; overflow: hidden; background: var(--wash); }
.d-pic img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.d-title { margin: 0; font-family: var(--cond); font-size: 2.4rem; line-height: 1.05; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; }
@media (min-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } .facts:has(> :last-child:nth-child(odd)) > :last-child { grid-column: 1 / -1; } }
.fact { background: var(--wash); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 16px; }
.fact dt { font-weight: 700; color: var(--muted); font-size: 1.0625rem; text-transform: uppercase; letter-spacing: .04em; }
.fact dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.btn-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .btn-row { grid-template-columns: repeat(2, 1fr); } .btn-row:has(> :last-child:nth-child(odd)) > :last-child { grid-column: 1 / -1; } }
.plan-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan-row .tog[aria-pressed="true"][data-plan="pass"] { background: var(--muted); border-color: var(--muted); }
.plan-row .tog[aria-pressed="true"][data-plan="maybe"] { background: var(--btn2); border-color: var(--btn2); }
.shot-full img { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--rule); }
.danger { background: var(--card); color: var(--warn); border-color: var(--warn); }
.danger.armed { background: var(--warn); color: #FFFFFF; }
.label { margin: 0; font-weight: 700; color: var(--muted); font-size: 1.0625rem; text-transform: uppercase; letter-spacing: .04em; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px;
  width: min(100% - 32px, 640px); padding: 10px 10px 10px 18px; background: #2A1638; color: #FFFFFF; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.toast p { margin: 0; flex: 1 1 auto; }
.toast.bad p { font-style: italic; }
.toast .x { background: rgba(255, 255, 255, .14); color: #FFFFFF; }

/* Locked */
.lock { max-width: 640px; margin: 48px auto; padding: 28px; background: var(--wash); border: 1px solid var(--rule); border-radius: 8px; display: flex; flex-direction: column; gap: 16px; }
.lock h2 { margin: 0; font-family: var(--cond); font-size: 2.2rem; }
