/* Höntsä – ilmoittautuminen. Värit ja fontit samat kuin pkshontsapelit.fi */
:root {
  --red: #b01e25; --red-bright: #d7262e; --red-dark: #8e171d; --red-soft: #fbeaea;
  --ink: #141212; --ink-2: #3d3939; --muted: #5a5555; --line: #eee7e7; --line-2: #d9d1d1;
  --bg: #f6f3f3; --card: #ffffff; --amber: #9a4a06;
  --shadow: 0 1px 2px rgba(20,18,18,.06), 0 6px 18px -12px rgba(20,18,18,.25);
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 Barlow, system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--red); } a:hover { color: var(--red-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #1f4e8c; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1; margin: 0; }
h1 { font-size: 32px; } h2 { font-size: 22px; } h3 { font-size: 18px; }

/* Yläpalkki */
.top { background: var(--red); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 12px 24px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { width: 48px; height: 33px; object-fit: contain; }
.brand b { display: block; font: 700 22px/1 var(--head); }
.brand span { font-size: 13px; opacity: .85; }
.topnav { display: none; flex: 1; gap: 4px; }
.topnav a { height: 44px; padding: 0 16px; border-radius: 999px; display: flex; align-items: center; color: #fff; text-decoration: none; font-weight: 600; opacity: .88; }
.topnav a[aria-current="page"] { background: rgba(255,255,255,.18); opacity: 1; font-weight: 700; }
.avatar { margin-left: auto; width: 44px; height: 44px; border-radius: 999px; background: #fff; color: var(--red); display: grid; place-items: center; text-decoration: none; font: 700 18px/1 var(--head); }

/* Alapalkki (puhelin) */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid #e6dfdf; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.bottomnav a[aria-current="page"] { color: var(--red); font-weight: 700; }
.bottomnav svg, .ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

main { max-width: 1200px; margin: 0 auto; padding: 16px 16px 110px; display: flex; flex-direction: column; gap: 14px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; }
.sub { color: var(--muted); font-size: 15px; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cols > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.card { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.card.dark { background: var(--ink); color: #fff; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; } .tiny { font-size: 13px; }
.label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.sep { border-top: 1px solid var(--line); padding-top: 12px; }

/* Napit */
.btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line-2); background: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); }
.btn:hover { color: var(--ink); border-color: #bfb5b5; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.inout { display: flex; gap: 8px; }
.inout .btn { min-width: 76px; }
.btn.in-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.out-on { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); }
.btn.vas { border-color: var(--red); color: var(--red); min-height: 36px; font-size: 13px; padding: 0 12px; }
.btn.vas.on { border-color: var(--line-2); color: var(--ink-2); }
.link { background: none; border: 0; padding: 0; color: var(--red); font-weight: 700; min-height: 36px; text-align: left; }

/* Lomakkeet */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
label.f .hint { font-weight: 500; color: var(--muted); font-size: 13px; }
.in { height: 46px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; font-size: 16px; font-weight: 500; background: #fff; width: 100%; min-width: 0; }
textarea.in { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--red); flex-shrink: 0; }
.switch { display: flex; align-items: center; gap: 12px; }
.switch input { appearance: none; width: 50px; height: 30px; border-radius: 999px; background: #cfc6c6; position: relative; margin: 0; flex-shrink: 0; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { left: 23px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e9e3e3; border-radius: 12px; padding: 4px; }
.seg button { height: 40px; padding: 0 4px; white-space: nowrap; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* Vuorokortti */
.week { margin-top: 6px; }
.shift { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.shift .what { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.datebox { width: 58px; height: 70px; flex-shrink: 0; border-radius: 12px; background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; }
.datebox span { font-size: 12px; font-weight: 600; text-transform: uppercase; opacity: .8; }
.datebox b { font: 700 26px/1 var(--head); }
.time { font: 700 21px/1.1 var(--head); }
.place { font-size: 15px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: var(--red-bright); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 7px; border-radius: 999px; background: var(--red-bright); color: #fff; vertical-align: middle; }
.tag.grey { background: #e9e3e3; color: var(--ink-2); }
.tag.dark { background: var(--ink); }
.shift .meta { width: 170px; display: flex; flex-direction: column; gap: 6px; }
.shift .acts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: auto; }
.status { font-size: 14px; font-weight: 600; }
.cancelled { opacity: .6; }

/* Vuoron sivu */
.hero { background: var(--red-dark); color: #fff; }
.hero-in { max-width: 1200px; margin: 0 auto; padding: 8px 16px 22px; display: flex; flex-direction: column; gap: 8px; }
.hero a.back { color: #fff; text-decoration: none; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; }
.hero h1 { font-size: 34px; }
.hero .chip { font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.18); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: #f3eeee; border: 2px solid #f3eeee; }
button.pchip { cursor: pointer; }
.pchip.me { background: var(--ink); border-color: var(--ink); color: #fff; }
.pchip.sel { background: var(--red-soft); border-color: var(--red); color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.dot.season { background: var(--ink); } .pchip.me .dot.season { background: #fff; }
.dot.single { border: 2px solid #8a8282; }
.dot.trial, .dot.guest { background: var(--red-bright); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.door { flex-direction: row; align-items: center; gap: 14px; }
.door b { font: 700 30px/1.1 var(--head); letter-spacing: .15em; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid #e6dfdf; padding: 8px 10px; white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid #f0eaea; vertical-align: middle; }
table.t tr.sel td { background: var(--red-soft); }
.num { text-align: right; width: 44px; }
.scroll { overflow-x: auto; }
.loglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.loglist time { color: var(--muted); display: inline-block; min-width: 92px; }
.nearby a { display: flex; gap: 8px; align-items: center; min-height: 40px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.nearby a.cur { background: var(--ink); color: #fff; font-weight: 700; }

/* Kalenteri (uusi vuoro) */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 16px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mgrid button, .mgrid span { height: 28px; border-radius: 6px; font-size: 12px; border: 0; background: transparent; padding: 0; color: var(--ink-2); }
.mgrid button.on { background: var(--red); color: #fff; font-weight: 700; }
.mgrid button.skip { background: #fff; border: 2px dashed var(--red); color: var(--red); font-weight: 700; text-decoration: line-through; }

/* Ilmoitukset */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.err { background: var(--red-dark); }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
.center-card { max-width: 440px; margin: 24px auto; width: 100%; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #e6dfdf; }
.tabs a { height: 46px; padding: 0 16px; display: flex; align-items: center; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--red); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f0eaea; color: var(--ink-2); white-space: nowrap; margin: 1px 2px 1px 0; }
.pill.dark { background: var(--ink); color: #fff; } .pill.red { background: var(--red-soft); color: var(--red-dark); } .pill.app { background: var(--red); color: #fff; }

@media (min-width: 900px) {
  .topnav { display: flex; }
  .avatar { margin-left: 0; }
  .bottomnav { display: none; }
  main { padding: 28px 32px 64px; gap: 18px; }
  .top-in, .hero-in { padding-left: 32px; padding-right: 32px; }
  h1 { font-size: 44px; } .hero h1 { font-size: 48px; }
  .toast { bottom: 32px; }
}
@media (max-width: 420px) { .grid3 { grid-template-columns: 1fr 1fr; } .shift .meta { width: 100%; } .shift .acts { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; margin-left: 0; } }
