/* Look follows the PAF program: pink ground, black type, 2px black rules, round outlined badges, blue as the only accent. */
:root {
  --bg: #fca5ba;     /* page */
  --fg: #000;        /* type + rules */
  --card: #fff;      /* header, boxes */
  --blue: #4169e1;
  --mute: rgba(0, 0, 0, .55);
  --hair: rgba(0, 0, 0, .22);
  --hair2: rgba(0, 0, 0, .07);
  --rule: 2px solid var(--fg);
  --pad: 18px;
  --px: 1.5;
  color-scheme: light;
}
/* night: same system inverted, for dark venues */
:root.night {
  --bg: #000;
  --fg: #fca5ba;
  --card: #000;
  --blue: #6f8dff;
  --mute: rgba(252, 165, 186, .62);
  --hair: rgba(252, 165, 186, .26);
  --hair2: rgba(252, 165, 186, .08);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 400 17px/1.35 "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; }
b, strong, h2, h3, h4 { font-weight: 400; }
.mute { color: var(--mute); }

/* badges like their CZ / EN circles */
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em;
  padding: 0 .35em; border: 1px solid currentColor; border-radius: 999px; font-size: 14px; line-height: 1;
}
.badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* header */
header.top { background: var(--card); border-bottom: var(--rule); padding-top: env(safe-area-inset-top); flex: none; }
.bar { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 var(--pad); }
.logo { font-size: 22px; letter-spacing: -.01em; white-space: nowrap; }
.status { flex: 1; font-size: 14px; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt { font-size: 17px; white-space: nowrap; }
.txt .on { text-decoration: underline; text-underline-offset: 3px; }

/* day row */
.days { display: flex; border-bottom: var(--rule); flex: none; }
.days button { flex: 1; padding: 10px 0 9px; text-align: center; font-size: 17px; white-space: nowrap; }
.days button + button { border-left: var(--rule); }
.days button.on { background: var(--fg); color: var(--bg); }
.days button.today::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: 6px; vertical-align: 2px; }

/* bottom tabs */
nav.tabs { display: flex; background: var(--card); border-top: var(--rule); padding-bottom: env(safe-area-inset-bottom); flex: none; }
nav.tabs button { flex: 1; height: 54px; text-align: center; font-size: 17px; }
nav.tabs button + button { border-left: var(--rule); }
nav.tabs button.on { background: var(--fg); color: var(--card); }

main#view { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
main.v-grid { display: flex; flex-direction: column; overflow: hidden; }
.empty { padding: 40px var(--pad); color: var(--mute); }

/* exhibitions strip */
.exh { display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--pad); flex: none; border-bottom: var(--rule); scrollbar-width: none; align-items: stretch; }
.exh::-webkit-scrollbar { display: none; }
.exh-l { flex: none; align-self: center; font-size: 14px; white-space: nowrap; }
.xchip { flex: none; background: var(--card); border: 1px solid var(--fg); padding: 6px 10px; font-size: 14px; line-height: 1.25; max-width: 210px; text-align: left; }
.xchip span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xchip small { display: block; font-size: 12px; color: var(--mute); white-space: nowrap; }
.xchip.hid { background: none; border-style: dashed; align-self: center; }
.xwrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px var(--pad) 4px; }

/* grid */
.gscroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.grid { display: grid; position: relative; min-width: 100%; }
.corner { position: sticky; top: 0; left: 0; z-index: 5; background: var(--bg); border-bottom: var(--rule); grid-row: 1; grid-column: 1; }
.vhead {
  position: sticky; top: 0; z-index: 4; grid-row: 1; background: var(--bg);
  border-bottom: var(--rule); border-left: 1px solid var(--fg); padding: 6px 7px; font-size: 14px; line-height: 1.15; overflow: hidden;
}
.vhead span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vhead small { display: block; font-size: 12px; color: var(--mute); white-space: nowrap; }
.tcol { position: sticky; left: 0; z-index: 3; background: var(--bg); grid-row: 2; grid-column: 1; border-right: 1px solid var(--fg); }
.tcol span { position: absolute; right: 5px; transform: translateY(-50%); font-size: 12px; }
.tcol span.first { transform: none; }
.tcol .nowlbl { color: #fff; background: var(--blue); padding: 1px 3px; z-index: 2; }
.vcol {
  position: relative; grid-row: 2; border-left: 1px solid var(--fg);
  background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(var(--hair2) 1px, transparent 1px);
  background-size: 100% calc(var(--px) * 60px), 100% calc(var(--px) * 30px);
}
.nowline { grid-row: 2; grid-column: 2 / -1; position: relative; pointer-events: none; z-index: 2; }
.nl { position: absolute; left: 0; right: 0; height: 2px; background: var(--blue); }
.ev {
  position: absolute; padding: 3px 5px; background: var(--card); border: 1px solid var(--fg);
  font-size: 13px; line-height: 1.2; overflow: hidden; display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.ev > * { flex: none; }
.ev .tm { font-size: 11px; }
.ev .ti { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 3); overflow: hidden; word-break: break-word; }
.ev .badges .badge { font-size: 10px; }
.ev.mine { background: var(--fg); color: var(--bg); }
.ev.past { opacity: .4; }
.ev.moved { border: 2px solid var(--blue); }

/* sheet */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto; max-width: 640px;
  max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--bg);
  border-top: var(--rule); padding-bottom: calc(24px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
@media (min-width: 641px) { .sheet-panel { border-left: var(--rule); border-right: var(--rule); } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.shead {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg); border-bottom: var(--rule); padding: 0 var(--pad); height: 48px; font-size: 15px;
}
.shead span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shead button { font-size: 17px; white-space: nowrap; }
.sb { padding: 16px var(--pad) 0; }
.sb h2 { font-size: 24px; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.sb .artists { font-size: 24px; line-height: 1.15; margin: 0 0 16px; }
.sb h4 { font-size: 15px; margin: 24px 0 8px; }
.cover { display: block; width: 100%; height: auto; background: rgba(0,0,0,.08); margin: 0 0 16px; }
.meta2 { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.meta2 > :last-child { text-align: right; }
.where { font-size: 14px; color: var(--mute); margin: 6px 0 12px; }
.planbtn {
  display: block; width: 100%; height: 52px; margin: 16px 0 8px; border: var(--rule); background: var(--bg);
  text-align: center; font-size: 17px;
}
.planbtn.on { background: var(--fg); color: var(--bg); }
.own { font-size: 14px; margin: 4px 0 8px; }
.warn { background: var(--blue); color: #fff; padding: 10px 12px; font-size: 15px; margin: 10px 0; }
.warn a { cursor: pointer; text-decoration: underline; }
.note { background: var(--card); border: 1px solid var(--fg); padding: 10px 12px; font-size: 15px; margin: 10px 0; }
.mini { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px; font-size: 14px; margin-left: 6px; vertical-align: 1px; }
.desc { font-size: 17px; line-height: 1.4; margin-top: 18px; }
.desc p { margin: 0 0 .9em; }
.desc a { text-decoration: underline; }
.official { display: inline-block; margin: 4px 0 8px; font-size: 17px; }
.hours { list-style: none; padding: 0; margin: 8px 0; border-top: 1px solid var(--fg); }
.hours li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--fg); font-size: 15px; }

/* filter sheet */
.tog { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--fg); font-size: 17px; }
.tog input { width: 20px; height: 20px; accent-color: var(--fg); margin: 0; }
.seg { display: flex; border: var(--rule); margin: 0 0 4px; }
.seg button { flex: 1; padding: 10px; text-align: center; font-size: 17px; }
.seg button + button { border-left: var(--rule); }
.seg button.on { background: var(--fg); color: var(--bg); }
.row2 { display: flex; gap: 8px; align-items: center; }
.row2 > * { flex: 1; }
input[type=password], input[type=datetime-local], select {
  background: var(--card); border: 1px solid var(--fg); border-radius: 0; padding: 9px 10px; font-size: 16px; min-width: 0;
  -webkit-appearance: none; appearance: none;
}
.btn { border: 1px solid var(--fg); padding: 9px 14px; text-align: center; font-size: 16px; background: var(--card); white-space: nowrap; }
details summary { cursor: pointer; padding: 8px 0; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: ' +'; }
details[open] summary::after { content: ' –'; }

/* lists (plan + now) */
.list { max-width: 720px; margin: 0 auto; padding-bottom: 32px; }
.seg.top { margin: 14px var(--pad) 0; }
.sum { padding: 14px var(--pad); border-bottom: var(--rule); }
.sum .d { font-size: 24px; display: block; margin-bottom: 4px; letter-spacing: -.01em; }
.sum small { font-size: 15px; }
.row { display: block; width: 100%; padding: 14px var(--pad); border-bottom: var(--rule); text-align: left; }
.row .meta2 { font-size: 15px; }
.row .ti { display: block; font-size: 21px; line-height: 1.2; margin-top: 6px; }
.row .sub { display: block; font-size: 15px; margin-top: 4px; }
.row .sub.alert { color: var(--blue); }
.row.mine { background: var(--fg); color: var(--bg); }
.row.mine .sub.alert { color: inherit; text-decoration: underline; }
.row.plain.mine { background: transparent; color: var(--fg); }
.row.plain.mine .sub.alert { color: var(--blue); text-decoration: none; }
.row.past { opacity: .45; }
.gap { padding: 8px var(--pad); border-bottom: var(--rule); font-size: 15px; color: var(--mute); }
.gap.bad { background: var(--blue); color: #fff; }
.h3 { padding: 20px var(--pad) 8px; border-bottom: var(--rule); font-size: 15px; }
.none { padding: 12px var(--pad); color: var(--mute); border-bottom: var(--rule); }
.here { display: flex; gap: 8px; align-items: center; padding: 12px var(--pad); border-bottom: var(--rule); font-size: 15px; }
.here select { flex: 1; }
.pretend { padding: 6px var(--pad); border-bottom: var(--rule); font-size: 15px; }
.pretend .row2 { padding-bottom: 8px; flex-wrap: wrap; }
.pretend input { flex: 1 1 100%; }
.drift { display: block; width: 100%; padding: 16px var(--pad); border-bottom: var(--rule); text-align: left; background: var(--card); }
.drift span { display: block; font-size: 28px; line-height: 1.1; letter-spacing: -.01em; }
.drift small { display: block; font-size: 15px; margin-top: 4px; }
.big { padding: 24px var(--pad); font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
.big small { display: block; font-size: 17px; margin-top: 10px; letter-spacing: 0; }

/* coin */
.coinbox { text-align: center; padding-top: 28px; }
.coin {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center;
  font-size: 52px; background: var(--card); border: var(--rule); animation: flip .28s linear infinite;
}
.coin.done { animation: none; background: var(--fg); color: var(--bg); }
@keyframes flip { to { transform: rotateY(360deg); } }
.vs { font-size: 17px; text-align: left; border-top: 1px solid var(--fg); }
.vs div { padding: 8px 0; border-bottom: 1px solid var(--fg); display: flex; gap: 12px; }
.res { font-size: 21px; margin: 18px 0 0; text-align: left; }

.toast {
  position: fixed; left: 50%; bottom: calc(74px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--fg); color: var(--bg); padding: 9px 16px; font-size: 15px; z-index: 60; white-space: nowrap;
  animation: up .2s ease-out;
}

/* grid toggle + starred exhibitions */
.gseg { position: sticky; left: 0; z-index: 2; flex: none; display: flex; align-self: center; border: var(--rule); background: var(--bg); box-shadow: 8px 0 0 var(--bg), -18px 0 0 var(--bg); margin-right: 6px; }
.gseg button { padding: 7px 10px; font-size: 15px; white-space: nowrap; }
.gseg button + button { border-left: var(--rule); }
.gseg button.on { background: var(--fg); color: var(--bg); }
.xchip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.xchip.on small { color: inherit; opacity: .75; }
.ev .star { position: absolute; top: 3px; right: 4px; font-size: 12px; line-height: 1; }

/* compressed my-plan calendar */
.mgrid { position: relative; }
.mblocks { position: absolute; left: 66px; right: 10px; top: 0; bottom: 0; }
.mblocks .ev { padding: 5px 8px; gap: 2px; }
.mblocks .ev .tm { font-size: 13px; }
.mblocks .ev .ti { font-size: 17px; line-height: 1.15; }
.mblocks .ev .vn { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mblocks .ev .star { top: 6px; right: 8px; font-size: 14px; }
.ev.clash { box-shadow: inset 0 0 0 3px var(--blue); }
.mlbl { position: absolute; left: var(--pad); font-size: 13px; transform: translateY(-1px); }
.mlbl.dim { color: var(--mute); transform: translateY(-50%); }
.mgap {
  position: absolute; left: 0; right: 0; height: 56px; margin-top: 4px; display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad) 0 66px; border-top: 1px dashed var(--fg); border-bottom: 1px dashed var(--fg); font-size: 14px;
}
.mgap small { font-size: 13px; color: var(--mute); }
.mgap.now { background: var(--blue); color: #fff; border-color: var(--blue); }
.mgap.now small { color: #fff; }
.mwalk { position: absolute; left: 4px; right: 0; display: flex; align-items: center; font-size: 12px; color: var(--mute); pointer-events: none; white-space: nowrap; overflow: hidden; }
.mwalk.bad { color: var(--blue); }
.mnl { position: absolute; left: 60px; right: 0; height: 2px; background: var(--blue); z-index: 3; pointer-events: none; }

/* registration reminder + maps */
.nag { background: var(--blue); color: #fff; padding: 12px var(--pad) 4px; border-bottom: var(--rule); font-size: 15px; }
.nagrow { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .45); margin-top: 8px; }
.nagrow span { flex: 1; }
.nagrow a, .nagrow button { color: #fff; text-decoration: underline; font-size: 15px; white-space: nowrap; }
.maplink { text-decoration: underline; color: var(--fg); }
