/* Ucet Chytry kurnik / Chickoop - vzhled podle aplikace Chytry kurnik a Mapy vajec
   (sw/mapavajec/web/css/style.css): pozadi Skorapka, bile karty s jemnym okrajem, Kurnik cervena
   pro akce, Uhlova pro text, Slama jen drobny akcent, pismo Outfit, tlacitka pilulky, tmavy rezim. */

@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/outfit-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/outfit-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #9B1B2A; --brand-dark: #6E1220; --straw: #E3B23C; --charcoal: #231F20;
  --brand-ink: #9B1B2A; --brand-soft: #F6E7E9;
  --bg: #F5F1EA; --surface: #ffffff; --surface-2: #ECE6DC; --line: #E6E0D6; --line-2: #D9D1C5;
  --ink: #231F20; --ink-2: #5C5557; --muted: #7D7577;
  --ok: #1F6A25; --ok-dot: #2E7D32; --ok-soft: #E6F2E7; --no: #B42318; --no-soft: #FDE8E6; --wait: #8A4A00; --wait-soft: #FDF1DE;
  --shadow-1: 0 1px 2px rgba(35, 31, 32, .05);
  --shadow-2: 0 8px 28px rgba(35, 31, 32, .14);
  --r: 20px; --r-l: 24px; --r-in: 14px;
  --top-h: 64px; --max: 720px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
[data-theme='dark'] {
  --brand-ink: #E8707A; --brand-soft: rgba(155, 27, 42, .22);
  --bg: #1A1718; --surface: #262223; --surface-2: #302B2C; --line: #3A3536; --line-2: #4A4445;
  --ink: #F5F1EA; --ink-2: #B9B2AC; --muted: #9A928D;
  --ok: #5CBF60; --ok-dot: #4CAF50; --ok-soft: rgba(76, 175, 80, .2); --no: #F2584B; --no-soft: rgba(242, 88, 75, .18); --wait: #F0A23B; --wait-soft: rgba(217, 119, 6, .2);
  --shadow-1: none;
  --shadow-2: 0 10px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 15.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-weight: 700; font-size: 1.85rem; letter-spacing: -.02em; }
h2 { font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 650; }
h1:focus, h2:focus { outline: none; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.center-self { align-self: center; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; border-radius: 6px; }

/* --- tlacitka ------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; background: var(--surface-2); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 88%, #fff); }
.btn-primary:active:not(:disabled) { background: var(--brand-dark); }
.btn-ghost:hover:not(:disabled) { background: var(--line); }
.btn-danger { background: var(--no); color: #fff; }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--no) 85%, #000); }
.btn.danger { color: var(--no); }
.btn.armed { background: var(--no); color: #fff; border-color: var(--no); }
.btn-link { background: none; border: 0; padding: 4px 2px; min-height: 0; color: var(--brand-ink); font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn-lg { min-height: 54px; padding: 0 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-apple { background: #000; color: #fff; width: 100%; }
[data-theme='dark'] .btn-apple { background: #fff; color: #000; }
.btn-google { border: 1px solid var(--line-2); background: var(--surface); }
.btn-skeleton { width: 100%; color: var(--muted); }
.btn svg { flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.g-dot { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.count { background: var(--brand); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 7px; }

/* --- hlavicka a paticka -------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 34px; height: 34px; display: block; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-by { font-size: .74rem; font-weight: 600; color: var(--brand-ink); letter-spacing: .02em; text-transform: uppercase; }
.brand-name { font-weight: 700; font-size: 1.22rem; letter-spacing: -.02em; margin-top: 3px; white-space: nowrap; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.lang { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 999px; color: var(--ink-2); cursor: pointer; }
.lang:hover, .lang:focus-within { background: var(--surface-2); }
.lang select { border: 0; background: none; font-weight: 600; color: var(--ink); cursor: pointer; padding: 0 2px; max-width: 8.5rem; }
.lang select:focus { outline: none; }
.lang select option { background: var(--surface); color: var(--ink); }
.logo-dark { display: none !important; }
[data-theme='dark'] .logo-light { display: none !important; }
[data-theme='dark'] .logo-dark { display: block !important; }

.account { flex: none; margin-left: 4px; }
.menu { position: relative; }
.avatar { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand);
  color: #fff; font-weight: 700; font-size: .95rem; cursor: pointer; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 34px; height: 34px; font-size: .82rem; background: rgba(255, 255, 255, .22); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-2); padding: 6px; display: flex; flex-direction: column; z-index: 50; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; text-decoration: none;
  border: 0; background: none; cursor: pointer; color: var(--ink); }
.menu-pop a:hover, .menu-pop button:hover, .menu-pop a:focus-visible, .menu-pop button:focus-visible { background: var(--surface-2); }
.menu-pop svg { color: var(--ink-2); }
.menu-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.menu-who small { color: var(--muted); }

.main { flex: 1; width: 100%; max-width: calc(var(--max) + 32px); margin: 0 auto; padding: 20px 16px 32px; }
.main:focus { outline: none; }
.main-auth { max-width: 480px; padding-top: clamp(20px, 6vh, 64px); }
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }
.demo-badge { display: none; }
.is-demo .demo-badge { display: block; width: fit-content; margin: 0 auto calc(14px + env(safe-area-inset-bottom)); padding: 6px 12px; border-radius: 999px;
  background: var(--straw); color: var(--charcoal); font-size: .8rem; font-weight: 600; box-shadow: var(--shadow-1); }

/* --- karty, formulare --------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.field small { font-size: .82rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input:not([type]), select.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-in); background: var(--bg); color: var(--ink); outline: 0;
  transition: border-color .15s, box-shadow .15s; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
input:focus, select.input:focus { border-color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-ink); }
input[readonly] { color: var(--ink-2); background: var(--surface-2); border-color: var(--line); }
input[aria-invalid='true'] { border-color: var(--no); }
.code-input { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding-left: calc(14px + .25em) !important; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--no); flex: none; }
.error-box { background: var(--no-soft); color: var(--no); padding: 10px 14px; border-radius: 12px; font-size: .92rem; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .76rem; font-weight: 650; white-space: nowrap; flex: none; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-ok i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dot); }
.badge-soft { background: var(--surface-2); color: var(--ink-2); }
.badge-wait { background: var(--wait-soft); color: var(--wait); }
.field > span .badge { height: 20px; font-size: .7rem; padding: 0 8px; }

/* --- prihlaseni ----------------------------------------------------------------------- */
.auth-card { padding: 28px 24px 22px; }
.auth-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 22px; }
.auth-head h1 { font-size: 1.6rem; }
.auth-head p { max-width: 34ch; }
.auth-logo { width: 64px; height: 64px; border-radius: 18px; background: var(--brand); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(155, 27, 42, .25); }
.auth-logo img { width: 40px; height: 40px; }
.auth-logo.bad { background: var(--no); box-shadow: none; }
.auth-logo.bad svg { width: 30px; height: 30px; }
.auth-providers { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.google-slot { min-height: 44px; display: flex; justify-content: center; }
.google-slot > * { width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .84rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-hint { text-align: center; margin-top: -4px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth-foot { font-size: .8rem; text-align: center; margin-top: 20px; }
.auth-foot a { color: var(--ink-2); }
.continue-as { justify-content: flex-start; gap: 12px; padding: 8px 20px 8px 10px; min-height: 60px; white-space: normal; text-align: left; }
.ca-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ca-text small { font-weight: 500; opacity: .85; overflow-wrap: anywhere; }
.demo-note { font-size: .85rem; color: var(--wait); background: var(--wait-soft); padding: 10px 12px; border-radius: 12px; margin-top: 12px; text-align: center; }
.demo-url { display: block; font-size: .78rem; padding: 10px; border-radius: 10px; background: var(--surface-2); overflow-wrap: anywhere; text-align: left; }
.spinner { width: 34px; height: 34px; margin: 6px auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- stranky uctu ------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin: 0 0 22px;
  width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 18px; border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a[aria-current='page'] { background: var(--brand-soft); color: var(--brand-ink); }
.page > h1 { margin-bottom: 18px; }
.hello { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.hello h1 { font-size: 1.75rem; }
.hello p { overflow-wrap: anywhere; }
.sec-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin: 8px 2px 10px; }
.services { display: grid; gap: 12px; margin-bottom: 26px; }
.svc { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.svc-head { display: flex; align-items: center; gap: 14px; }
.svc-head > div { flex: 1; min-width: 0; }
.svc-icon { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; }
.svc-icon-egg { background: var(--brand-soft); }
.svc-icon-plain { background: var(--surface-2); color: var(--ink-2); }
.svc-soon { opacity: .8; }
.svc-empty { color: var(--ink-2); font-size: .94rem; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { display: inline-flex; align-items: baseline; gap: 5px; padding: 8px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; }
.stat b { font-size: 1.3rem; color: var(--ink); font-weight: 700; line-height: 1; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.skeleton { pointer-events: none; display: flex; flex-direction: column; gap: 10px; }
.skeleton i { display: block; height: 12px; border-radius: 6px; width: 70%; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton i:nth-child(2) { width: 45%; } .skeleton i:nth-child(3) { width: 60%; }
.svc.skeleton { min-height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.acc-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-link { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.acc-link:hover { border-color: var(--brand-ink); }
.acc-link > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acc-link small { color: var(--muted); font-size: .84rem; }
.acc-link > svg { color: var(--muted); }
.acc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); flex: none; }

.form-card { padding: 20px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 14px; }
.form-card > h2 { display: flex; align-items: center; gap: 10px; }
.form-card > h2 svg { color: var(--brand-ink); }
.form-actions { display: flex; justify-content: flex-end; }
.pw-form { max-width: 420px; }
[data-pw] > p, [data-methods] > ul { margin-bottom: 12px; }
.methods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.methods li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.methods li:first-child { border-top: 0; padding-top: 2px; }
.m-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.m-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.m-main small { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.danger-link { text-align: center; margin-top: 18px; }
.danger-link a { color: var(--no); font-weight: 600; font-size: .92rem; }
.danger-card { border-color: color-mix(in srgb, var(--no) 40%, var(--line)); }
.danger-card .lead { font-size: 1.05rem; font-weight: 550; }
.del-list { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.confirm-box { padding: 16px; border-radius: 16px; background: var(--no-soft); }
.confirm-box h2 { color: var(--no); }

/* --- obchody (jako Mapa vajec) ------------------------------------------------------- */
.store-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.store-badge { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 10px; border-radius: 10px;
  background: #000; color: #fff; text-decoration: none; border: 1px solid #000; }
[data-theme='dark'] .store-badge { border-color: #5a5354; }
.store-badge > span { display: flex; flex-direction: column; line-height: 1.05; }
.store-badge small { font-size: .64rem; font-weight: 500; opacity: .85; }
.store-badge b { font-size: .98rem; font-weight: 600; letter-spacing: -.01em; }
a.store-badge:hover { background: #222; }
.store-badge.soon { opacity: .72; cursor: default; }

/* --- toasty --------------------------------------------------------------------------- */
.toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); font-weight: 550;
  animation: toast-in .25s cubic-bezier(.2, .9, .3, 1.2); transition: opacity .3s, transform .3s; }
.toast-err { background: var(--no); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 600px) {
  :root { --top-h: 58px; }
  .topbar { gap: 8px; padding: 0 10px 0 14px; }
  .brand-name { font-size: 1.08rem; }
  .lang { padding: 0 6px; }
  .lang svg { display: none; }
  .lang select { max-width: 6.5rem; }
  .main { padding: 16px 16px 28px; }
  .main-auth { padding-top: 16px; }
  .auth-card { padding: 22px 18px 18px; border-radius: var(--r-l); }
  h1, .hello h1 { font-size: 1.5rem; }
  .auth-head h1 { font-size: 1.4rem; }
  .acc-links { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
  .tabs a { flex: 1; text-align: center; padding: 8px 10px; }
  .svc { padding: 16px; }
  .svc-head { flex-wrap: wrap; }
  .svc-head .badge { margin-left: 62px; }
  .form-card { padding: 16px; }
  .form-actions .btn, .row .btn { flex: 1 1 auto; }
}
@media (max-width: 360px) { .brand-by { display: none; } .brand-name { margin-top: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
