/* Valoisa yö: järvi, lakka ja puolukka. Vaalea ja tumma teema. */
:root {
  --bg: #f1f5f3; --surface: #ffffff; --ink: #12262c; --muted: #5b6f76; --line: #d9e2df;
  --lake: #1e5b6e; --on-lake: #ffffff; --lake-soft: #e1eef2;
  --berry: #b5335a; --lakka: #e9962a; --danger: #b42318; --ok: #1f8a5b;
  --sky1: #a9d3e0; --sky2: #f6ddb2; --sky3: #f1b078; --sun: #fff4d6; --water: #7fb4c6; --trees: #1c4a57; --hero-ink: #0f2f3a;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1a1f; --surface: #142529; --ink: #e8f1ef; --muted: #8fa5ab; --line: #243a40;
    --lake: #7cc0d4; --on-lake: #08202a; --lake-soft: #173640;
    --berry: #f0708f; --lakka: #f3b25a; --danger: #f97066; --ok: #4cc38a;
    --sky1: #16323e; --sky2: #46586a; --sky3: #c98a55; --sun: #ffe7b0; --water: #1b4655; --trees: #07181e; --hero-ink: #f1f7f6;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 8vw, 52px); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; margin: 22px 0 8px; }
h4 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 14px 0 4px; }
p { margin: 0 0 8px; }
a { color: var(--lake); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--lake) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* lomakkeet ja painikkeet */
input, select, textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
input:focus, select:focus, textarea:focus { border-color: var(--lake); outline: none; }
input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--lake); }
input[type=checkbox], input[type=radio] { accent-color: var(--lake); }
button { padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
button:hover:not(:disabled) { border-color: var(--lake); }
button:disabled { opacity: .5; cursor: default; }
button.primary, .primary { background: var(--lake); color: var(--on-lake); border-color: var(--lake); font-weight: 600; border-radius: 999px; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.danger { color: var(--danger); }
button.link { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 4px; }
button.icon { border: 0; background: none; font-size: 22px; padding: 4px 10px; }
button.on { color: var(--berry); border-color: var(--berry); }
button.small { padding: 4px 12px; font-size: 13px; border-radius: 999px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
label.check input { width: auto; }
fieldset { border: 1.5px solid var(--line); border-radius: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
legend { color: var(--muted); font-size: 14px; padding: 0 6px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad { padding-top: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lbl { font-size: 14px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 4px; }

/* maisema */
.land { display: block; width: 100%; height: 100%; }
.herocard, .authhero { position: relative; overflow: hidden; color: var(--hero-ink); background: var(--sky1); }
.herocard { border-radius: 24px; min-height: 200px; margin-bottom: 14px; }
@media (min-width: 720px) { .herocard { min-height: 230px; } }
.authhero { min-height: 320px; }
.herocard .land, .authhero .land { position: absolute; inset: 0; }
.herotext { position: relative; padding: 22px 22px 0; max-width: 32em; }
.herocard .herotext h2 { font-size: clamp(24px, 6vw, 32px); font-weight: 700; letter-spacing: -0.02em; }
.herotext p { margin-top: 6px; opacity: .85; }
.herotext .logo { width: 34px; height: 34px; margin-bottom: 10px; }
.land .tree { fill: var(--trees); }

/* kirjautuminen */
.auth { max-width: 460px; margin: 0 auto; min-height: calc(100dvh / var(--z, 1)); display: flex; flex-direction: column; background: var(--bg); }
.auth .authhero { border-radius: 0 0 28px 28px; padding-bottom: 28px; }
.auth form, .auth > p, .auth > button { margin: 22px 22px 0; }
.auth.landing form { margin: 0; }
.auth .muted { margin-bottom: 0; }

/* sivut */
.page { max-width: 600px; margin: 0 auto; padding: 0 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.topbar h2 { flex: 1; font-size: 20px; }

/* yläpalkki ja navigointi */
.shell { display: flex; flex-direction: column; height: calc(100dvh / var(--z, 1)); max-width: 900px; margin: 0 auto; }
.top { flex: none; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 5; }
.topin { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand right" "nav nav"; align-items: center; padding-top: env(safe-area-inset-top); }
.brand { grid-area: brand; min-width: 0; }
.nav { grid-area: nav; }
.topright { grid-area: right; display: flex; align-items: center; gap: 6px; padding: 10px 12px 4px 0; }
.topright .langflags, .topright .adminbtn { margin: 0; }
.brand { display: flex; align-items: center; gap: 8px; padding: 10px 16px 4px; font: 700 20px/1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; padding: 2px 6px 6px; gap: 2px; }
.nav button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; border-radius: 14px; padding: 7px 2px 6px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.nav button:hover:not(:disabled) { color: var(--ink); }
.nav .ico svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav button.on { color: var(--lake); background: var(--lake-soft); font-weight: 700; }
.nav button.on .ico svg { stroke-width: 2.2; }
.nav .badge { position: absolute; top: 2px; left: 50%; margin-left: 6px; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 14px; }
@media (min-width: 720px) {
  .topin { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav right"; gap: 12px; padding: 8px 18px; }
  .nav { justify-self: center; }
  .topright { padding: 0; gap: 10px; }
  .brand { padding: 0; }
  .nav { padding: 0; gap: 4px; }
  .nav button { flex: none; flex-direction: row; gap: 8px; padding: 9px 14px; font-size: 14.5px; border-radius: 999px; }
  .nav .badge { position: static; margin: 0; }
  .view { padding: 20px; }
}
.badge { background: var(--berry); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 6px; }

/* alanavigointi: alivälilehdet */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; }
.subtabs button { flex: 1; white-space: nowrap; border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.subtabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.subtabs.small button { font-size: 13px; padding: 6px 10px; }

/* jäsenkortit ja listat */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 800px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; padding: 0; border: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--lake-soft); text-align: left; display: block; }
.tile .tphoto, .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .ph { display: grid; place-items: center; width: 100%; height: 100%; font: 700 56px var(--display); color: var(--lake); opacity: .5; }
.tile .tcap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 34px 12px 11px; color: #fff; background: linear-gradient(transparent, rgba(8, 24, 30, .78)); }
.tile .tcap strong { font: 600 16px/1.2 var(--display); }
.tile .tcap span { font-size: 12.5px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tbadge { position: absolute; top: 10px; left: 10px; font-style: normal; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(31, 138, 91, .92); padding: 2px 9px 2px 7px; border-radius: 999px; }
.tile:hover:not(:disabled) { filter: brightness(1.05); }
.pager { display: flex; gap: 8px; padding: 16px 0; }
.pager button { flex: 1; }

.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; text-align: left; width: 100%; }
.row:last-child { border-bottom: 0; }
.row:hover:not(:disabled) { background: var(--lake-soft); }
.row .meta { text-align: right; flex: none; }
.avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: var(--lake-soft); flex: none; }
.avatar.big { width: 124px; height: 124px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--lake); }
.avwrap { position: relative; flex: none; display: inline-flex; }
.dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: #9ca3af; border: 2.5px solid var(--surface); }
.dot.on { background: var(--ok); }
p .dot, .muted .dot { position: static; display: inline-block; width: 9px; height: 9px; border: 0; margin-right: 4px; }
.empty { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty h3 { margin: 0; }

/* etusivu */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 4px; }
.stats button { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 12px 4px; border-radius: 16px; }
.stats b { font: 700 28px/1.1 var(--display); color: var(--lake); }
.stats span { font-size: 12px; color: var(--muted); text-align: center; }
.news { border-left: 4px solid var(--lakka); background: var(--surface); border-radius: 0 14px 14px 0; padding: 12px 16px; }
.news ul { margin: 6px 0 0; padding-left: 18px; }
.news li { margin-bottom: 4px; font-size: 14px; }

/* selauskortti */
.card { display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin: 0 auto; }
.photo { position: relative; aspect-ratio: 3 / 4; max-height: calc(64dvh / var(--z, 1)); width: 100%; border-radius: 26px; overflow: hidden; background: var(--lake-soft); cursor: pointer; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dots { position: absolute; top: 10px; left: 10px; right: 56px; display: flex; gap: 4px; }
.dots i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .45); }
.dots i.on { background: #fff; }
.more { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .4) !important; color: #fff; border-radius: 50% !important; }
.info h2 { font-size: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips span { border-radius: 999px; padding: 3px 12px; font-size: 13px; background: var(--lake-soft); color: var(--lake); font-weight: 500; }
.actions { display: flex; justify-content: center; gap: 30px; padding: 4px 0 8px; }
.round { width: 66px; height: 66px; border-radius: 50%; font-size: 28px; padding: 0; background: var(--surface); }
.round.like { background: var(--berry); border-color: var(--berry); color: #fff; }

/* profiili */
.profile { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; max-width: 600px; margin: 0 auto; }
.profile .stack { width: 100%; }
.pill { font-size: 12px; padding: 2px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; }
.pill.approved { color: var(--ok); border-color: var(--ok); }
.pill.pending { color: var(--lakka); border-color: var(--lakka); }
.pill.rejected { color: var(--danger); border-color: var(--danger); }
.profile .subtabs { width: 100%; }
.ownbody { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 6px; }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 0; }
.member-profile { display: flex; flex-direction: column; gap: 8px; max-width: 600px; margin: 0 auto; }
.hero { width: 100%; max-height: calc(62dvh / var(--z, 1)); object-fit: cover; border-radius: 26px; background: var(--lake-soft); }
.actionrow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0; }
.actionrow button { border-radius: 999px; }
@media (min-width: 560px) { .actionrow { grid-template-columns: repeat(4, 1fr); } }
.thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.thumbs figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.thumbs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; background: var(--lake-soft); }
.thumbs figcaption { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs figcaption button { padding: 4px 10px; font-size: 13px; border-radius: 999px; }
.thumbs figure button { align-self: flex-start; }
.filebtn { display: block; text-align: center; padding: 12px; border-radius: 999px; cursor: pointer; }

/* muokkaus ja haku */
.chips.editable span { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.chips.editable span button { border: 0; background: none; padding: 0 4px; font-size: 16px; line-height: 1; color: inherit; }
.chip { border-radius: 999px; padding: 4px 12px; font-size: 13px; background: none; text-align: left; }
.chips.sugg { gap: 6px; }
.mode-easy .only-nick, .mode-easy .only-adv, .mode-nick .not-nick, .mode-nick .only-adv, .mode-adv .only-nick { display: none; }
.chipset { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; }
.chipset label.check { font-size: 14px; }
form#ff { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 16px; }
details { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--surface); }
summary { cursor: pointer; font-weight: 600; }
details ul { margin: 8px 0 0; padding-left: 18px; }
details li { margin-bottom: 6px; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--lakka); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.btnlink { display: block; text-align: center; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }

/* chat */
.chat { display: flex; flex-direction: column; height: 100%; max-width: 640px; margin: 0 auto; }
.chat .topbar { padding-top: 0; }
.chead { flex: 1; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; padding: 0 4px; text-align: left; }
.chead h2 { font-size: 18px; }
.msgs { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.msg { max-width: 78%; padding: 9px 14px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.msg.mine { align-self: flex-end; background: var(--lake); color: var(--on-lake); border-bottom-right-radius: 6px; }
.msg.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.send { display: flex; gap: 8px; padding-top: 8px; align-items: center; }
.send input { flex: 1; border-radius: 999px; }
.send .icon { flex: none; padding: 0 6px; }
.emojis { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0; }
.emojis button { border: 0; background: none; font-size: 22px; padding: 2px 6px; }
#sugg { padding: 6px 0; flex-direction: column; align-items: stretch; }
#sugg .chip { text-align: left; border-radius: 14px; line-height: 1.35; }
.view > .chat { min-height: 100%; }

/* ikkunat */
.overlay { position: fixed; inset: 0; background: rgba(6, 20, 26, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet, .modal { background: var(--bg); width: 100%; max-width: 560px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; gap: 8px; }
.modal { text-align: center; align-items: center; }
.modal h2 { font-size: 28px; color: var(--berry); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90%; z-index: 30; text-align: center; }
#toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* etusivun ilmoitustaulu */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pills:empty { display: none; }
.pillbtn { border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.pillbtn b { color: var(--berry); }
.board { background: var(--lake-soft); border-radius: 26px; padding: 16px 0 14px 16px; margin-bottom: 16px; position: relative; }
.boardhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-right: 16px; margin-bottom: 12px; }
.boardhead h3 { margin: 0; font-size: 20px; }
.radii { display: flex; gap: 4px; }
.radii button { padding: 5px 11px; font-size: 13px; border-radius: 999px; background: var(--surface); }
.radii button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.board .tiles.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 16px 10px 0; }
.board .tiles.rail .tile { flex: none; width: 150px; scroll-snap-align: start; }
@media (min-width: 720px) { .board .tiles.rail .tile { width: 172px; } }
.board > #boardbody > .link { margin-top: 4px; }
.board .empty { padding: 24px 16px 24px 0; }
.tile .tdist { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, .92); padding: 2px 9px; border-radius: 999px; }
.newsbox { margin-top: 8px; }

/* varmennus, merkit, turvallisuus */
.vcheck { width: 1.05em; height: 1.05em; vertical-align: -0.14em; margin-left: 4px; fill: var(--lake); stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile .tcap .vcheck { fill: #5cc6e6; }
.tile .tbadge.new { background: var(--berry); }
.tile .tcap .tgoal { font-style: normal; font-size: 11.5px; opacity: .95; margin-top: 2px; color: #ffe9b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goalchip { display: inline-block; background: var(--lake-soft); color: var(--lake); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: 14px; }
.hint { color: var(--berry); font-weight: 500; }
.scam { background: #fff4e0; color: #6b4300; border: 1px solid var(--lakka); border-radius: 12px; padding: 8px 12px; font-size: 13px; margin: 4px 0 8px; max-width: 92%; }
@media (prefers-color-scheme: dark) { .scam { background: #3a2b10; color: #ffd99a; } }
.nudge { display: flex; flex-direction: column; gap: 8px; margin: 0 0 8px; }
.actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.actions button { padding: 5px 12px; font-size: 13px; border-radius: 999px; }
.gesture { background: var(--lake-soft); border-radius: 16px; padding: 16px; text-align: center; margin: 12px 0; }
.gesture strong { display: block; font: 600 20px var(--display); color: var(--lake); margin-top: 6px; }
.endorse { margin: 8px 0; padding: 10px 14px; border-left: 4px solid var(--lakka); background: var(--surface); border-radius: 0 12px 12px 0; }
.endorse footer { margin-top: 6px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.safetyrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.safetyrow button { flex: 1 1 160px; }
.overlay.center { align-items: center; padding: 16px; }
.sheet.scroll { max-height: calc(88vh / var(--z, 1)); overflow-y: auto; border-radius: 22px; }
.sheet textarea { width: 100%; }

/* Yhdessä ja ylläpito: ilmoituskortit */
.acts { display: grid; gap: 12px; margin-top: 12px; }
.act { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-top: 12px; }
.acts .act { margin-top: 0; }
.act.off { opacity: .6; }
.act header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.act header .muted { margin-left: auto; }
.act h3 { margin: 4px 0; font-size: 18px; }
.act p { margin: 4px 0; }
.act footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.catchip { background: var(--lake-soft); color: var(--lake); border-radius: 999px; padding: 2px 11px; font-size: 12.5px; font-weight: 600; }
.catchip.ev { background: var(--lakka); color: #3b2600; }
.catchip.off { background: var(--line); color: var(--muted); }
.avatar.sm { width: 32px; height: 32px; }
.act .who { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font-weight: 600; }
.msgrow { padding: 6px 10px; border-radius: 10px; background: var(--lake-soft); margin: 6px 0; font-size: 14px; }
.msgrow.bad { background: #fde7e7; }
@media (prefers-color-scheme: dark) { .msgrow.bad { background: #3b1d1d; } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 16px; text-align: left; background: var(--surface); }
.stat b { font: 700 30px var(--display); color: var(--lake); }
.stat span { font-size: 13px; color: var(--muted); }
.stat.alert { border-color: var(--berry); }
.stat.alert b { color: var(--berry); }
.vgrid { display: flex; gap: 10px; overflow-x: auto; }
.vgrid figure { margin: 0; flex: none; width: 150px; }
.vgrid img { width: 150px; height: 190px; object-fit: cover; border-radius: 12px; }
.setting { padding: 10px 0; border-bottom: 1px solid var(--line); }
.searchbar { display: flex; gap: 8px; margin-bottom: 8px; }
.searchbar input { flex: 1; }
.adminbtn { border: 0; background: none; padding: 4px; color: var(--lake); display: inline-flex; margin-left: 6px; }
.adminbtn .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.announce { border-left-color: var(--berry); }
.subtabs.admin { flex-wrap: wrap; }
.subtabs.admin button { flex: 1 1 auto; }

/* Paikalla nyt -lista */
.main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.online { flex: none; padding: 8px 14px 0; }
.online h3 { margin: 0 0 6px; font: 600 14px var(--display); display: flex; align-items: center; gap: 6px; }
.online .count { background: var(--ok); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.olist { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.orow { flex: none; position: relative; width: 74px; }
.oopen { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; width: 100%; }
.oname { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; font-size: 12px; max-width: 100%; }
.oname strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 74px; font-weight: 600; }
.oname .small { display: none; }
.ochat { position: absolute; top: -4px; right: -2px; width: 26px; height: 26px; padding: 0; border-radius: 50%; font-size: 13px; background: var(--surface); }
@media (min-width: 1000px) {
  .shell { max-width: 1180px; }
  .main { flex-direction: row; }
  .online { width: 250px; padding: 20px 0 20px 18px; overflow-y: auto; border-right: 1px solid var(--line); margin-right: 4px; }
  .online h3 { font-size: 15px; margin-bottom: 10px; }
  .olist { flex-direction: column; gap: 4px; overflow: visible; }
  .orow { width: auto; display: flex; align-items: center; gap: 4px; }
  .oopen { flex-direction: row; gap: 10px; padding: 6px 8px; border-radius: 14px; text-align: left; }
  .oopen:hover { background: var(--lake-soft); }
  .oname { align-items: flex-start; text-align: left; font-size: 14px; flex: 1; min-width: 0; }
  .oname strong { max-width: 130px; }
  .oname .small { display: block; }
  .ochat { position: static; flex: none; margin-right: 12px; }
}
.view { min-width: 0; }
@media (max-width: 999px) { .online.hide-m { display: none; } }

/* yleinen chatti */
.pubbox { height: min(calc(58dvh / var(--z, 1)), 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 10px; }
.pm { padding: 7px 12px; border-radius: 14px; background: var(--lake-soft); max-width: 88%; align-self: flex-start; overflow-wrap: anywhere; }
.pm.mine { align-self: flex-end; background: var(--lake); color: var(--on-lake, #fff); }
.pm.mine .link, .pm.mine .muted { color: inherit; opacity: .85; }
.pmhead { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pmhead .pname { font-weight: 700; padding: 0; }
.pmhead .pmmore { margin-left: auto; padding: 0 6px; font-size: 16px; line-height: 1; border: 0; background: none; color: inherit; opacity: .7; }
.pubday { align-self: center; font-size: 12px; color: var(--muted); margin: 6px 0 2px; }

/* yleinen chatti: jäsenlista vasemmalla */
.online.hide-all { display: none !important; }
.pubwrap { display: grid; gap: 10px; grid-template-columns: 1fr; }
.pubusers { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; min-width: 0; }
.pubusers h3 { margin: 0 0 6px; font: 600 14px var(--display); display: flex; align-items: center; gap: 6px; }
.pubusers .count { background: var(--ok); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.ulist { display: flex; gap: 8px; overflow-x: auto; }
.urow { flex: none; display: flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 4px 2px 2px; background: var(--lake-soft); }
.urow .uava { border: 0; background: none; padding: 0; display: inline-flex; }
.uname { border: 0; background: none; padding: 2px 4px; font-weight: 600; font-size: 13.5px; text-align: left; white-space: nowrap; }
.uname small { font-weight: 400; color: var(--muted); }
.urow .ochat { position: static; width: 24px; height: 24px; margin: 0; }
.gm { color: #1f6fb8; } .gf { color: #c0356b; } .gx { color: var(--ink); }
.pm.mine .gm, .pm.mine .gf, .pm.mine .gx { color: inherit; }
.usym { font-weight: 400; }
.pubmain { min-width: 0; display: flex; flex-direction: column; }
.pubtop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pubrules { margin-bottom: 6px; }
.pmsys { align-self: flex-start; margin: 0; font-size: 12.5px; color: var(--muted); font-style: italic; }
.pm.tome { box-shadow: 0 0 0 2px var(--lakka); }
@media (min-width: 720px) {
  .pubwrap { grid-template-columns: 230px minmax(0, 1fr); align-items: start; }
  .ulist { flex-direction: column; overflow-y: auto; max-height: min(calc(66dvh / var(--z, 1)), 640px); gap: 2px; }
  .urow { border-radius: 14px; background: none; padding: 3px 4px; }
  .urow:hover { background: var(--lake-soft); }
  .urow .uname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* roolimerkit */
.rbadge { width: 1.1em; height: 1.1em; vertical-align: -0.17em; margin-left: 4px; stroke-linejoin: round; stroke-linecap: round; stroke-width: 1.6; }
.rbadge.vip { fill: #f2b84b; stroke: #8a5a08; }
.rbadge.poliisi { fill: #2a6fb5; stroke: #123c6b; }
.rbadge.poliisi .star { fill: #fff; stroke: none; }
.rbadge.admin { fill: none; stroke: var(--berry); stroke-width: 2.2; }
.tile .tcap .rbadge.admin { stroke: #ffb3cf; }
.tile .tcap .rbadge.poliisi { fill: #5aa2e6; stroke: #fff; }
.rolesel { display: inline-flex; align-items: center; gap: 6px; }
.rolesel select { padding: 4px 8px; font-size: 13px; border-radius: 999px; }

/* tähti / suosikit */
.star { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: #fff; background: rgba(8, 24, 30, .45); user-select: none; -webkit-tap-highlight-color: transparent; }
.star.on { color: #f5b82e; background: rgba(8, 24, 30, .6); }
.star:focus-visible { outline: 3px solid var(--lakka, #f5a623); outline-offset: 2px; }
.tile .star { position: absolute; top: 8px; right: 8px; z-index: 2; }
.orow .star, .favrow .star { width: 30px; height: 30px; font-size: 18px; color: var(--muted, #667); background: transparent; }
.orow .star.on, .favrow .star.on { color: #e0a000; }
.favlist { display: flex; flex-direction: column; gap: 8px; }
.favrow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 16px; background: var(--card, #fff); border: 1px solid var(--line, rgba(0,0,0,.08)); }
.favopen { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.favopen .avatar { width: 48px; height: 48px; flex: none; }
.favmsg { flex: none; padding: 8px 12px; }

/* yhteinen historia */
.thist { position: absolute; left: 10px; top: 38px; display: flex; gap: 3px; z-index: 1; }
.thist i, .hist i { font-style: normal; font-size: 12px; line-height: 1; padding: 3px 5px; border-radius: 999px; background: rgba(255,255,255,.92); color: #234; }
.hist { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.hist i { background: var(--lake-soft, #e6f1f3); }
.histbox { margin: 10px 0; padding: 10px 14px; border-radius: 16px; background: var(--lake-soft, #e6f1f3); }
.histbox p { margin: 4px 0 0; font-size: 14px; }

/* kelluvat chat-ikkunat */
.chatdock { position: fixed; right: 14px; bottom: 0; z-index: 40; display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 10px; pointer-events: none; }
.chatdock > * { pointer-events: auto; }
.dockpill { margin-bottom: 14px; border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 600; background: var(--lake); color: var(--on-lake, #fff); box-shadow: 0 6px 22px rgba(8, 24, 30, .28); }
.dockpill[hidden] { display: none; }
.dockwin { order: 1; width: 340px; height: min(480px, calc(calc(100dvh / var(--z, 1)) - 90px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 30px rgba(8, 24, 30, .3); overflow: hidden; }
.dockwin.pub { order: 0; width: 380px; }
.dockwin.min { height: auto; width: 240px; }
.dockwin.min .dockbody { display: none; }
.dockhead { flex: none; display: flex; align-items: center; background: var(--lake); color: var(--on-lake, #fff); }
.dockwin.attn .dockhead { animation: dockpulse 1.2s ease-in-out infinite; }
@keyframes dockpulse { 50% { background: var(--lakka, #f5a623); color: #1b1b1b; } }
@media (prefers-reduced-motion: reduce) { .dockwin.attn .dockhead { animation: none; background: var(--lakka, #f5a623); color: #1b1b1b; } }
.dockttl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; color: inherit; font-weight: 700; padding: 10px 6px 10px 12px; text-align: left; }
.dockttl .dtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dockttl .dsub { color: inherit; opacity: .8; font-weight: 400; white-space: nowrap; }
.dockttl .avatar { width: 26px; height: 26px; flex: none; }
.dockbadge { background: var(--lakka, #f5a623); color: #1b1b1b; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
.dockbadge[hidden] { display: none; }
.dockbtn { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; padding: 10px 9px; }
.dockbtn:hover { background: rgba(255, 255, 255, .15); }
.dockbody { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px; overflow: hidden; }
.dockbody .chat { height: 100%; max-width: none; margin: 0; min-height: 0; }
.dockbody .msgs { padding: 4px 0; }
.dockbody .send { padding-top: 6px; }
.dockbody .pubwrap { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.dockbody .pubusers { flex: none; padding: 6px 10px; border-radius: 14px; }
.dockbody .pubusers h3 { margin-bottom: 4px; }
.dockbody .ulist { flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; gap: 6px; }
.dockbody .urow { border-radius: 999px; background: var(--lake-soft); padding: 2px 4px 2px 2px; }
.dockbody .pubmain { flex: 1; min-height: 0; }
.dockbody .pubbox { height: auto; flex: 1; min-height: 0; margin-bottom: 6px; }
.dockbody .send { margin: 0; }
.fullbar { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.fullhost { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fullchat .dmchat { height: 100%; }
@media (max-width: 720px) {
  .chatdock { left: 8px; right: 8px; bottom: 0; flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .dockwin, .dockwin.pub { width: auto; height: min(calc(72dvh / var(--z, 1)), calc(calc(100dvh / var(--z, 1)) - 90px)); border-radius: 16px 16px 0 0; }
  .dockwin.min, .dockwin.pub.min { height: auto; width: auto; border-radius: 12px; border: 1px solid var(--line); }
  .dockwin:not(.min) { order: -1; }
  .dockpill { align-self: flex-end; margin-bottom: 10px; }
}

/* mitä seuraa etsitään */
.seekchips { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.seekchip { font-style: normal; font-size: 13px; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: var(--lake-soft); color: var(--lake); }
.seekchip.k-partner { background: #fde3ec; color: #a3214f; }
.seekchip.k-dating { background: #fff0d6; color: #8a5a00; }
.seekchip.k-other { background: #ece8f7; color: #4b3b8f; }

/* ylläpidon tehtävät */
.taskform { margin-bottom: 14px; }
.tasklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); }
.task.p-high { border-left-color: #c0356b; }
.task.p-normal { border-left-color: var(--lake); }
.task.done { opacity: .72; }
.task.done .taskmain strong { text-decoration: line-through; }
.taskcheck { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--lake); background: transparent; color: var(--lake); font-weight: 700; padding: 0; }
.task.done .taskcheck { background: var(--lake); color: var(--on-lake, #fff); }
.taskmain { flex: 1; min-width: 0; }
.taskmain p { margin: 4px 0 0; }
.taskact { display: flex; flex-direction: column; gap: 4px; }
.tchip { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--lake-soft); color: var(--lake); }
.tchip.pr-high { background: #fde3ec; color: #a3214f; }
.tdone summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* paikalla nyt: kategoriasuodatin */
.ocats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.ocat { padding: 4px 11px; min-height: 32px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.ocat.on { background: var(--lake); border-color: var(--lake); color: #fff; }
@media (max-width: 999px) { .ocats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; } .ocat { flex: none; } }

/* kielilaput ja alatunniste */
.langflags { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.flagbtn { width: 28px; height: 20px; padding: 0; border-radius: 4px; border: 2px solid transparent; background: none; overflow: hidden; opacity: .6; line-height: 0; min-height: 0; }
.flagbtn svg { width: 100%; height: 100%; display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.flagbtn.on { opacity: 1; border-color: var(--lake); }
.flagbtn:hover { opacity: 1; }
.shellfoot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center; padding: 18px 14px calc(90px + env(safe-area-inset-bottom)); font-size: 14px; }
.shellfoot .langflags { margin-left: 0; }
.authlinks { align-items: center; text-align: center; }
@media (min-width: 1000px) { .shellfoot { padding-bottom: 24px; } }

/* paikalla nyt: painikkeen takana */
.otoggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font: 600 15px var(--display); color: var(--ink); text-align: left; }
.otoggle .count { background: var(--ok); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.otoggle .ochev { margin-left: auto; font-style: normal; color: var(--lake); }
#opanel { margin-top: 8px; }
#opanel[hidden] { display: none; }

/* etusivu (kirjautuminen) */
.auth.landing { max-width: 1000px; padding-bottom: 32px; background: var(--bg); }
.ltop { display: flex; align-items: center; gap: 10px; padding: 14px 20px; }
.ltop > .logo, .ltop > svg:first-child { width: 30px; height: 30px; flex: none; }
.landing .lname { font: 700 18px var(--display); letter-spacing: -0.02em; }
.landing .lhero { display: grid; gap: 20px; padding: 8px 20px 0; align-items: center; }
.landing .lpitch h1 { font: 700 clamp(30px, 7vw, 48px)/1.04 var(--display); letter-spacing: -0.03em; margin: 0 0 10px; }
.landing .lpitch p { font-size: 17px; color: var(--muted); max-width: 30em; margin: 0 0 12px; }
.lchips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.lchips li { padding: 5px 12px; border-radius: 999px; background: var(--lake-soft); color: var(--lake); font-weight: 600; font-size: 14px; }
.landing .lcard { margin: 0; max-width: 360px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px 16px; gap: 10px; box-shadow: 0 8px 24px rgba(15,47,58,.1); }
.landing .lcard label { font-size: 14px; gap: 4px; }
.landing .lcard input:not([type=checkbox]) { padding: 9px 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--lake-soft); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 7px; font-weight: 600; color: var(--lake); min-height: 0; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.scenewrap { margin: 22px 0 0; }
.scene { width: 100%; height: auto; display: block; }
.lcta { text-align: center; background: var(--lake-soft); border-radius: 24px; padding: 28px 18px; margin-left: 16px; margin-right: 16px; }
.lcta p { color: var(--muted); }
.lcta .primary { min-width: 200px; }
.landing .authlinks { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 22px 20px 0; }
@media (min-width: 860px) { .landing .lhero { grid-template-columns: 1.2fr 1fr; padding: 20px 28px 0; } .landing .lcard { justify-self: end; } .scenewrap { margin: 28px 20px 0; border-radius: 28px; overflow: hidden; } }
@media (min-width: 860px) { .vtiles { grid-template-columns: repeat(4, 1fr); } }
.lsec { margin: 34px 22px 0; }
.lsec h2 { font: 700 22px var(--display); letter-spacing: -0.02em; margin: 0 0 12px; }
.lsteps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
.lsteps li { counter-increment: s; position: relative; padding-left: 46px; min-height: 34px; }
.lsteps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--lake); color: var(--on-lake); display: grid; place-items: center; font: 700 16px var(--display); }
.lsafe { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.mapgrid { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.fimap { width: 100%; height: auto; }
.mland { fill: var(--lake-soft); stroke: var(--lake); stroke-width: 2; stroke-linejoin: round; }
.mdot { fill: var(--berry); fill-opacity: .88; stroke: #fff; stroke-width: 2; }
.mnum { fill: #fff; font: 700 12px var(--body); }
.mbig { margin: 0 0 10px; }
.mbig b { font: 700 40px/1 var(--display); color: var(--lake); display: block; }
.mlist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.mlist li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 2px 0; }
@media (min-width: 700px) { .auth.landing { max-width: 720px; } .mapgrid { grid-template-columns: 190px 1fr; } }

/* ohjesivu sovelluksen sisällä */
.helplangs { display: flex; gap: 8px; flex-wrap: wrap; }
.helptoc { display: flex; flex-wrap: wrap; gap: 8px; }
.helptoc a { padding: 6px 12px; border-radius: 999px; background: var(--lake-soft); color: var(--lake); text-decoration: none; font-weight: 600; font-size: 14px; }

/* etusivun kuvitukset */
.ill { width: 100%; height: auto; display: block; }
.i-card { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.i-face { fill: var(--sky3); } .i-body { fill: var(--lake); } .i-accent { fill: var(--berry); }
.i-tick { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.i-stroke { stroke: var(--lake); stroke-width: 3; stroke-linecap: round; fill: none; }
.i-dot { fill: var(--lakka); } .i-dot2 { fill: var(--lake); }
.i-sky { fill: var(--sky1); } .i-sun { fill: var(--sun); } .i-water { fill: var(--water); } .i-tree { fill: var(--trees); } .i-tent { fill: var(--lakka); }
.i-warm { fill: var(--sky2); } .i-cup { fill: var(--surface); stroke: var(--lake); stroke-width: 3; } .i-cup2 { fill: var(--lake); }
.i-steam { stroke: var(--lake); stroke-width: 3; stroke-linecap: round; opacity: .55; } .i-heart { fill: var(--berry); }
.i-dusk { fill: var(--sky3); } .i-house { fill: var(--trees); } .i-door { fill: var(--lakka); } .i-lit { fill: var(--sun); }
.i-sky2 { fill: var(--lake-soft); } .i-star { fill: var(--lakka); stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.ltiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ltile { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 8px 8px 14px; }
.ltile h3 { font: 700 17px var(--display); margin: 10px 8px 2px; }
.ltile p { font-size: 14px; color: var(--muted); margin: 0 8px; }
.lsteps li { padding-left: 0; display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.lsteps li::before { content: none; }
.lsteps .ill { border-radius: 16px; background: var(--lake-soft); padding: 6px; }
@media (min-width: 700px) { .ltiles { grid-template-columns: repeat(4, 1fr); } }

/* kulurakenne */
.ctable { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.ctable td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ctable td:last-child { text-align: right; white-space: nowrap; }
.ctable tfoot td { border-bottom: 0; padding-top: 10px; }
.support { background: var(--lake-soft); border-radius: 16px; padding: 12px 14px; margin-top: 10px; }
.support p { margin: 4px 0; }
.support code { font: 600 15px var(--body); word-break: break-all; }
.supbtn { border-color: var(--berry); color: var(--berry); }
.chero { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--lake-soft), #fbeaf0); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; }
.cbig { font: 700 28px/1.1 var(--display, var(--body)); }
.cbig span { font-size: 15px; font-weight: 500; margin-left: 3px; }
.cbars { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.crow { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.cbar { height: 9px; border-radius: 6px; background: rgba(0,0,0,.07); margin-top: 4px; overflow: hidden; }
.cbar i { display: block; height: 100%; border-radius: 6px; }
.support { background: linear-gradient(135deg, #fbeaf0, var(--lake-soft)); border: 1px solid rgba(0,0,0,.06); }
.shead { font-weight: 700; font-size: 16px; color: var(--berry); }
.acctbox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.acctbox code { flex: 1 1 200px; }
.invhero { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--lake-soft), #fbeaf0); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; }
.invhero h3 { margin: 0 0 4px; }
.invbtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.invbtns .btn { display: inline-block; padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(0,0,0,.15); text-decoration: none; color: inherit; background: #fff; }
.invbtns [hidden] { display: none; }
.legal h2 { margin-top: 18px; } .legal .note { background: var(--lake-soft); padding: 10px 12px; border-radius: 12px; }
/* mainospaikat */
.adwrap { margin: 12px 14px; }
.adwrap[hidden] { display: none; }
.adslot { position: relative; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 12px 10px; background: var(--surface); font-size: 13px; }
.adslot:not(.adfree) { border-style: solid; }
.adtag { position: absolute; top: -8px; left: 10px; background: var(--surface); padding: 0 6px; font-size: 11px; color: var(--muted, #777); }
.adlink { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.adlink img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.adtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adtext em { font-style: normal; font-size: 11px; color: var(--muted, #777); }
.adfree .adtext strong { color: var(--berry); }
.leftcol { display: contents; }
.adside, #adSide { display: none; }
@media (min-width: 1000px) {
  .leftcol { display: flex; flex-direction: column; width: 250px; flex: none; border-right: 1px solid var(--line); margin-right: 4px; overflow-y: auto; }
  .leftcol .online { width: auto; border-right: 0; margin-right: 0; overflow: visible; }
  #adSide { display: block; margin: 12px 14px 20px 18px; }
  #adSide[hidden] { display: none; }
}
.logoutbtn { display: inline-flex; align-items: center; gap: 6px; margin: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 600 13px var(--body); white-space: nowrap; }
.logoutbtn:hover { background: var(--lake-soft); }
@media (max-width: 420px) { .logoutbtn span { display: none; } .logoutbtn { padding: 7px 9px; } }
/* tekstin koko: koko sivu skaalataan (zoom), koska mitat ovat px-yksiköissä; --z kompensoi näkymän korkeusyksiköt */
html[data-fsize="small"] { zoom: 0.9; --z: 0.9; }
html[data-fsize="large"] { zoom: 1.125; --z: 1.125; }
html[data-fsize="xl"] { zoom: 1.25; --z: 1.25; }
.admintodo { background: var(--lake-soft); border-radius: 16px; padding: 10px 14px; margin: 0 0 12px; }
.admintodo h3 { margin: 0 0 6px; font-size: 15px; }
.admintodo[hidden] { display: none; }
.safetybar { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.safetyrow2 { display: flex; align-items: center; gap: 8px; background: var(--lake-soft); border-radius: 12px; padding: 8px 10px; }
.shellfoot .provider { flex-basis: 100%; text-align: center; }
.ltag { margin-left: 4px; align-self: flex-end; padding-bottom: 3px; } @media (max-width: 520px) { .ltag { display: none; } }
/* pyyhkäisykortit */
.swipebox { margin: 0 0 12px; }
.swipetoggle { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 16px; background: linear-gradient(135deg, var(--lake-soft), #fbeaf0); border: 1px solid var(--line); font: 600 16px var(--body); color: var(--ink); }
.swipetoggle.on .ochev { transform: rotate(180deg); }
#swipeHost { padding-top: 10px; }
.card { will-change: transform; user-select: none; -webkit-user-select: none; position: relative; }
.card .photo img { pointer-events: none; -webkit-user-drag: none; }
.card[data-dir="like"]::after, .card[data-dir="pass"]::after { position: absolute; top: 18px; padding: 4px 14px; border: 3px solid; border-radius: 10px; font: 800 26px var(--display); background: rgba(255,255,255,.85); z-index: 2; }
.card[data-dir="like"]::after { content: "♥"; left: 18px; color: var(--berry); transform: rotate(-10deg); }
.card[data-dir="pass"]::after { content: "✕"; right: 18px; color: #555; transform: rotate(10deg); }
.socialset { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: grid; gap: 8px; }
.socrow { display: flex; flex-wrap: wrap; gap: 8px; }
.socchip { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--lake); text-decoration: none; font-weight: 600; font-size: 14px; }
.socchip:hover { background: var(--lake-soft); }

/* puhelinnäkymä: vähemmän kerrallaan */
.footmore { display: none; }
.instbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; max-width: 560px; margin: 0 auto; text-align: left; }
.instbox summary { cursor: pointer; font-weight: 600; }
.instbox p { margin: 8px 0 0; }
@media (max-width: 719px) {
  .footmore { display: inline-flex; }
  .shellfoot { padding: 8px 14px calc(76px + env(safe-area-inset-bottom)); }
  .shellfoot > :not(.footmore) { display: none; }
  .shellfoot.open > :not(.footmore) { display: inline-flex; }
  .shellfoot.open > .provider { display: block; }
  .logoutbtn span { display: none; }
  .logoutbtn { padding: 8px 10px; }
  .topin { padding-left: 10px; padding-right: 10px; }
  .brand span { font-size: 1.05rem; }
  .ltag { display: none; }
}
@media (max-width: 719px) {
  .shellfoot { position: fixed; left: 0; bottom: 0; z-index: 30; width: auto; max-width: 100%; padding: 0 0 env(safe-area-inset-bottom); justify-content: flex-start; background: transparent; pointer-events: none; }
  .shellfoot > * { pointer-events: auto; }
  .shellfoot .footmore { margin: 0 0 8px 10px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(8, 24, 30, .18); font-size: 13px; }
  .shellfoot.open { right: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(8, 24, 30, .2); gap: 8px 14px; justify-content: center; pointer-events: auto; }
  .shellfoot.open .footmore { margin: 0; flex-basis: 100%; text-align: center; box-shadow: none; }
  .main { padding-bottom: 52px; }
}
.scene2 { margin-top: 34px; }
.scene2 .scene { display: block; width: 100%; height: auto; border-radius: 22px; }
.instrow { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; max-width: 620px; margin: 0 auto; }
.instrow .instill .ill { width: 100%; height: auto; }
.instrow .instbox { margin: 0; max-width: none; }
.ctaill .ill { width: 150px; height: auto; margin: 0 auto 6px; display: block; }
/* mainoskuvat */
.adslot.hasimg .adlink { flex-direction: column; align-items: stretch; gap: 8px; }
.adslot.hasimg .adlink img { width: 100%; height: auto; border-radius: 10px; }
.adslot.hasimg.ad-landing img, .adslot.hasimg.ad-home img { aspect-ratio: 3 / 1; object-fit: cover; }
.adslot.hasimg.ad-side img { aspect-ratio: 1 / 1; object-fit: cover; }
.adprev { margin: 4px 0; }
.adsizes { line-height: 1.5; }
/* ohjesivun kuvakaappaukset */
.helpshots { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 4px; }
.helpshots figure { margin: 0; width: min(100%, 230px); }
.helpshots img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(8, 24, 30, .14); background: var(--surface); }
.helpshots figcaption { font-size: 13px; color: var(--muted, #667); margin-top: 6px; line-height: 1.35; }
/* ylläpidon viestit */
.adminav { display: grid; place-items: center; background: var(--lake); color: var(--on-lake, #fff); width: 44px; height: 44px; border-radius: 50%; flex: none; }
.adminrow { border: 1px solid var(--lake); background: var(--lake-soft); margin: 8px 0; }
.admhead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.admmsgs { display: grid; gap: 10px; margin-bottom: 14px; max-height: calc(60vh / var(--z, 1)); overflow-y: auto; }
.admmsg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }

.menucard{display:flex;flex-direction:column;border:1px solid var(--line,#2a3a40);border-radius:14px;overflow:hidden;margin:12px 0}
.menucard>button,.menucard>a{border:0;border-radius:0;margin:0;width:100%;text-align:left;background:transparent;display:flex;justify-content:space-between;align-items:center;padding:14px 16px;box-sizing:border-box}
.menucard>button:not(:last-child),.menucard>a:not(:last-child){border-bottom:1px solid var(--line,#2a3a40)}
.menucard>button::after{content:"\203A";opacity:.5;font-size:1.2em}
.menucard>#logout::after{content:""}
.menucard>#logout{opacity:.8}

.tabcard{border:1px solid var(--line,#2a3a40);border-radius:14px;padding:12px;margin:12px 0}
.tabcard .subtabs{margin:0 0 10px}
.tabcard .ownbody{margin:0 0 12px}
.tabedit{display:flex;gap:8px;border-top:1px solid var(--line,#2a3a40);padding-top:12px}
.tabedit>button{flex:1;margin:0}

.ownsec{margin:0 0 16px;text-align:left}
.ownsec h3{margin:0 0 8px;font-size:1rem}
.profile .menucard{width:100%;align-self:stretch;box-sizing:border-box}
.menucard>button,.menucard>a{gap:12px}
.adminrow.adminlast{margin-top:12px}

.msg{position:relative}
.msg .mdel{position:absolute;top:2px;right:4px;border:0;background:transparent;color:inherit;opacity:0;font-size:.7rem;padding:2px 4px;cursor:pointer;min-height:0;width:auto}
.msg.mine:hover .mdel,.msg.mine:focus-within .mdel{opacity:.7}
@media (hover:none){.msg.mine .mdel{opacity:.45}}
.msg.gone{opacity:.6}

.sideev{padding:12px 14px;border-top:1px solid var(--line,#2a3a40)}
.sideev h4{margin:0 0 8px;font-size:.95rem}
.sevlist{display:flex;flex-direction:column;gap:6px;margin-bottom:6px}
.sev{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:2px;width:100%;padding:8px 10px;border-radius:10px;min-height:0}
.sev strong{font-size:.9rem;font-weight:600}
@media (max-width:719px){.sideev{display:none!important}}

.orline{display:flex;align-items:center;gap:10px;color:var(--muted,#8a9a9f);font-size:.85rem;margin:6px 0}
.orline::before,.orline::after{content:"";flex:1;border-top:1px solid var(--line,#2a3a40)}
.gbtn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;background:#fff;color:#1f1f1f;border:1px solid #dadce0;font-weight:600}
/* Yleisen chatin tekstit pienemmiksi ja selkeämmiksi */
.pm { font-size: 13px; line-height: 1.4; padding: 6px 10px; border-radius: 12px; }
.pmhead { font-size: 12px; }
.pmhead .muted.small { font-size: 11px; }
.pmsys { font-size: 12px; }

.pillbadge{display:inline-block;margin-left:6px;min-width:20px;padding:1px 7px;border-radius:999px;background:var(--lakka,#f5a623);color:#1b1b1b;font-size:12px;font-weight:700;text-align:center}
.pillbadge[hidden]{display:none}
.dockpill:has(.pillbadge:not([hidden])){animation:dockpulse 1.2s ease-in-out infinite}
@media (prefers-reduced-motion: reduce){.dockpill:has(.pillbadge:not([hidden])){animation:none}}
.pm { font-size: 12px; padding: 5px 9px; }
.pmhead { font-size: 11px; }
.pmhead .muted.small { font-size: 10px; }
.pmsys { font-size: 11px; }
@media (min-width:720px){.pubwrap{grid-template-columns:minmax(0,1fr)!important}}
/* Yksityisten chattien tekstit samaan kokoon kuin yleisessä chatissa */
.msg { font-size: 12px; line-height: 1.4; padding: 6px 10px; border-radius: 14px; }
.msg time { font-size: 10px; margin-top: 1px; }
.msg.mine { border-bottom-right-radius: 5px; }
.msg.theirs { border-bottom-left-radius: 5px; }
.msg.gone { font-size: 12px; }
.infotbl{width:100%;border-collapse:collapse;font-size:.9rem;margin:8px 0}.infotbl th{text-align:left;font-weight:600;padding:4px 10px 4px 0;vertical-align:top;white-space:nowrap}.infotbl td{padding:4px 0;overflow-wrap:anywhere}
.redcard{border-left:4px solid #c0392b}.catchip.redchip{background:#fde7e7;color:#8a1c1c}@media (prefers-color-scheme: dark){.catchip.redchip{background:#3b1d1d;color:#ffb4b4}}

.sharecard{border:1px solid var(--line,#2a3a40);border-radius:14px;padding:12px;margin:12px 0;text-align:left}
.sharecard h3{margin:0 0 6px;font-size:1rem}
.qrbox{display:flex;justify-content:center;margin:10px 0}.qrbox svg{border-radius:12px;max-width:100%;height:auto}
.sharecode{font-size:1.4rem;letter-spacing:.12em}
.freeline{margin:6px 0 10px;padding:8px 12px;border-radius:12px;background:var(--lake-soft,#e3eef2);display:inline-block}.freeline strong{color:var(--lake,#1f5d70)}

.freeline{border:0;font:inherit;color:inherit;cursor:pointer;text-align:left}.freeline .freemore{color:var(--lake,#1f5d70);text-decoration:underline;margin-left:4px}

.ftiles{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.ftile{display:grid;grid-template-columns:72px minmax(0,1fr);gap:14px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:12px 14px}
.ftile svg.ill{width:72px;height:auto;aspect-ratio:1;background:var(--lake-soft);border-radius:16px;padding:8px;box-sizing:border-box}
.ftile h3{font:700 16px var(--display);margin:0 0 2px}.ftile p{font-size:14px;color:var(--muted);margin:0;line-height:1.4}
.countryline{margin:4px 0 12px;max-width:44ch}
.ltiles{grid-template-columns:repeat(2,minmax(0,1fr))}@media(min-width:700px){.ltiles{grid-template-columns:repeat(4,minmax(0,1fr))}}
.ftile{grid-template-columns:92px minmax(0,1fr);align-items:start}
.ftile svg.ill{width:92px;aspect-ratio:8/5;padding:4px;border-radius:14px}
.lvalues .vtiles{grid-template-columns:repeat(2,minmax(0,1fr))}
.pushbar{position:fixed;left:12px;right:12px;bottom:72px;z-index:60;display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 14px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.pushbar span{flex:1 1 100%;font-size:14px}
