@font-face {
  font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-latin-ext-v20.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: Manrope; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-latin-v20.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 {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #fafcff;
  --ink: #12233d;
  --muted: #4a5b75;
  --muted-2: #5a6a82;
  --line: #dce4f0;
  --line-strong: #c5d2e6;
  --blue: #2b5797;
  --blue-dark: #1c3f73;
  --blue-soft: #e1eaf7;
  --focus: #9dbbe6;
  --app-bg: #eef3fa;
  --blob-1: #dce7f5;
  --blob-2: #e3ecf8;
  --tint: #eef3fa;
  --on-accent: #d9e5f5;
  --accent-strong: #3e6bad;
  --accent-edge: #24497f;
}

/* Colour themes, chosen per member in /app/nastaveni (<html data-theme>). The settings page previews the checked
   option live via :has(); the id inside :has() outranks [data-theme], so a preview beats the saved theme. */
:root:has(#theme-blue:checked) {
  --bg: #f3f6fb; --surface-soft: #fafcff; --ink: #12233d; --muted: #4a5b75; --muted-2: #5a6a82; --line: #dce4f0; --line-strong: #c5d2e6;
  --blue: #2b5797; --blue-dark: #1c3f73; --blue-soft: #e1eaf7; --focus: #9dbbe6; --app-bg: #eef3fa; --blob-1: #dce7f5; --blob-2: #e3ecf8;
  --tint: #eef3fa; --on-accent: #d9e5f5; --accent-strong: #3e6bad; --accent-edge: #24497f;
}
[data-theme="pink"], :root:has(#theme-pink:checked) {
  --bg: #fdf3f8; --surface-soft: #fffafc; --ink: #33162a; --muted: #6e4a60; --muted-2: #7d5a6f; --line: #f3d9e6; --line-strong: #e8c0d3;
  --blue: #c2256f; --blue-dark: #8f1650; --blue-soft: #fbe2ef; --focus: #f2a7c9; --app-bg: #fdecf4; --blob-1: #f9cfe2; --blob-2: #fcdcea;
  --tint: #fdecf4; --on-accent: #fde0ee; --accent-strong: #da4b8f; --accent-edge: #a11d5d;
}
[data-theme="green"], :root:has(#theme-green:checked) {
  --bg: #f2f8f4; --surface-soft: #fafdfb; --ink: #12301f; --muted: #4a6656; --muted-2: #5a7565; --line: #d6e8dc; --line-strong: #bcd8c6;
  --blue: #2e7d4f; --blue-dark: #1f5a38; --blue-soft: #dff1e6; --focus: #9fd3b3; --app-bg: #ebf5ee; --blob-1: #d2eadb; --blob-2: #e0f1e6;
  --tint: #ebf5ee; --on-accent: #d9f0e2; --accent-strong: #43976a; --accent-edge: #22603c;
}
[data-theme="purple"], :root:has(#theme-purple:checked) {
  --bg: #f6f3fc; --surface-soft: #fcfbff; --ink: #221a3d; --muted: #5a5275; --muted-2: #685f83; --line: #e2dcf2; --line-strong: #cdc3ea;
  --blue: #6a4bc4; --blue-dark: #4b3196; --blue-soft: #ebe5fa; --focus: #bfaef0; --app-bg: #f1edfb; --blob-1: #ded5f6; --blob-2: #e8e1f9;
  --tint: #f1edfb; --on-accent: #e6defb; --accent-strong: #8467d6; --accent-edge: #523aa3;
}
[data-theme="orange"], :root:has(#theme-orange:checked) {
  --bg: #fdf6f1; --surface-soft: #fffbf8; --ink: #3a2214; --muted: #6e5444; --muted-2: #7c6352; --line: #f2dfd2; --line-strong: #e6c7b2;
  --blue: #c0501c; --blue-dark: #8f3a12; --blue-soft: #fde6d8; --focus: #f4b493; --app-bg: #fdf0e7; --blob-1: #fbd9c4; --blob-2: #fde5d6;
  --tint: #fdf0e7; --on-accent: #fde2d2; --accent-strong: #dc6d38; --accent-edge: #9c4216;
}
[data-theme="red"], :root:has(#theme-red:checked) {
  --bg: #fdf4f4; --surface-soft: #fffafa; --ink: #3a1518; --muted: #6e4a4d; --muted-2: #7d5a5d; --line: #f3dadb; --line-strong: #e8c1c3;
  --blue: #c0303a; --blue-dark: #8e1f27; --blue-soft: #fbe1e2; --focus: #f2a5aa; --app-bg: #fdeeee; --blob-1: #f9d3d5; --blob-2: #fcdfe0;
  --tint: #fdeeee; --on-accent: #fde0e1; --accent-strong: #d94a53; --accent-edge: #a0242d;
}
[data-theme="wine"], :root:has(#theme-wine:checked) {
  --bg: #faf4f6; --surface-soft: #fffbfc; --ink: #2e0d18; --muted: #64454f; --muted-2: #73545e; --line: #eedbe2; --line-strong: #e0c2cd;
  --blue: #78072f; --blue-dark: #52041f; --blue-soft: #f3dde5; --focus: #d99ab0; --app-bg: #f8edf1; --blob-1: #efd3dd; --blob-2: #f4e0e7;
  --tint: #f8edf1; --on-accent: #f6dde6; --accent-strong: #9a2550; --accent-edge: #5a0522;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Manrope, system-ui, sans-serif; line-height: 1.5; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.small { font-size: 13px; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack-6 { display: flex; flex-direction: column; gap: 6px; }
.stack-14 { display: flex; flex-direction: column; gap: 14px; }

label, .label { font-size: 14px; font-weight: 600; }
input, select {
  height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface-soft); width: 100%;
}
input:focus, select:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px;
  border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: var(--bg); }
.btn-link { background: none; color: var(--blue); padding: 0 8px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 11px; background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong); }
.btn-icon:hover { background: var(--blue-soft); border-color: var(--blue-soft); color: var(--ink); }
.btn-danger { background: #fdf0ee; color: #b3261e; border: 1px solid #f0c4be; }
.btn-danger:hover { background: #fbe1dd; border-color: #e3a49b; }
/* Armed by the first click of a two-click delete. */
.btn-danger[data-armed] { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn-lg { height: 50px; font-size: 16px; width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

/* Public pages */
.public { min-height: 100vh; display: flex; flex-direction: column; }
.public-header, .public-footer, .hero { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
.public-header { padding-block: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.public-footer { padding-block: 24px; font-size: 13px; color: var(--muted-2); border-top: 1px solid var(--line); }
.hero { flex: 1; padding-block: 48px 64px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 500px; }
.pill { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 6px 12px; border-radius: 999px; }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; font-size: 15px; font-weight: 600;
}
.chip svg { color: var(--blue); }
.chip-plain { background: none; border-color: transparent; color: var(--muted); padding-inline: 6px; }
.login-card {
  flex: 0 1 420px; min-width: 0; padding: 36px; border-radius: 20px; display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 18px 40px -24px rgba(18, 35, 61, 0.35);
}
.login-card h2 { font-size: 24px; font-weight: 800; }

.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px 80px; }
.center-card {
  width: 100%; max-width: 480px; padding: 44px 36px; border-radius: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px; box-shadow: 0 18px 40px -24px rgba(18, 35, 61, 0.35);
}
.center-card h1 { font-size: 28px; font-weight: 800; }
.center-card form { width: 100%; }
.icon-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.row-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.row-center form { width: auto; }

/* App */
.app { position: relative; min-height: 100vh; overflow: hidden; background: var(--app-bg); transition: background-color .3s ease; }
.app-blob { position: absolute; border-radius: 50%; pointer-events: none; animation: drift 14s ease-in-out infinite; }
.app-blob-1 { top: -120px; right: -80px; width: 420px; height: 420px; background: var(--blob-1); }
.app-blob-2 { bottom: -160px; left: -120px; width: 380px; height: 380px; background: var(--blob-2); animation-delay: -7s; }
.app-header {
  position: relative; max-width: 1160px; margin: 0 auto; padding: 28px 32px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.app-user { display: flex; align-items: center; gap: 12px; }
.user-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; line-height: 1.3; }
.avatar {
  width: 38px; height: 38px; flex: none; border-radius: 50%; background: #fff; color: var(--blue-dark);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.avatar-lg { width: 52px; height: 52px; font-size: 20px; background: var(--blob-1); }
.content {
  position: relative; max-width: 1160px; margin: 0 auto; padding: 40px 32px 160px;
  display: flex; flex-direction: column; gap: 24px; animation: fade-in .4s ease both;
}
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { font-size: 32px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.info {
  position: relative; width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--muted); font: italic 700 14px/1 Georgia, serif; cursor: help; transition: color .2s ease, border-color .2s ease;
}
.info:hover, .info:focus-visible { color: var(--blue-dark); border-color: var(--blue-dark); }
.info-tip {
  position: absolute; z-index: 20; top: calc(100% + 10px); left: 50%; width: max-content; max-width: min(320px, 80vw);
  padding: 10px 14px; border-radius: 12px; background: var(--ink); color: #fff; text-align: left;
  font: 500 14px/1.45 Manrope, system-ui, sans-serif; letter-spacing: 0; pointer-events: none;
  opacity: 0; transform: translate(-50%, -6px) scale(.95); transform-origin: top center;
  transition: opacity .18s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.info:hover .info-tip, .info:focus .info-tip { opacity: 1; transform: translate(-50%, 0) scale(1); }

.dock {
  position: fixed; left: 50%; bottom: 28px; z-index: 10; display: flex; gap: 6px; padding: 10px;
  background: #fff; border-radius: 24px; box-shadow: 0 20px 40px -20px rgba(18, 35, 61, 0.45);
  transform: translateX(-50%); animation: dock-in .7s .15s cubic-bezier(.2, .8, .2, 1) both;
}
.dock-item {
  position: relative; width: 52px; height: 52px; border-radius: 16px; color: var(--muted); text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), background .2s ease, color .2s ease;
}
.dock-item svg { width: 22px; height: 22px; }
.dock-item:hover, .dock-item:focus-visible { transform: translateY(-6px) scale(1.12); background: var(--tint); color: var(--ink); }
.dock-item.is-active { background: var(--blue); color: #fff; }
.dock-item.is-active:hover, .dock-item.is-active:focus-visible { background: var(--blue-dark); color: #fff; }
.dock-label {
  position: absolute; bottom: calc(100% + 12px); left: 50%; padding: 7px 12px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translate(-50%, 8px) scale(.85); transform-origin: bottom center;
  transition: opacity .18s ease, transform .25s cubic-bezier(.3, 1.5, .5, 1);
}
.dock-label::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--ink);
}
.dock-item:hover .dock-label, .dock-item:focus-visible .dock-label { opacity: 1; transform: translate(-50%, 0) scale(1); }
.dock-label-short { display: none; }
.dock-sep { width: 1px; margin: 8px 4px; flex: none; background: var(--line); }
.dock-ext-mark { position: absolute; top: 4px; right: 4px; display: flex; opacity: .55; }
.dock-ext-mark svg { width: 10px; height: 10px; }
/* On narrow screens the secondary sections and the external links fold into one "Další" item with a pop-up menu. */
.dock-links { display: none; position: relative; }
.dock-links > summary { list-style: none; cursor: pointer; }
.dock-links > summary::-webkit-details-marker { display: none; }
.dock-links[open] > summary { background: var(--tint); color: var(--ink); }
.dock-links-menu {
  position: absolute; right: 0; bottom: calc(100% + 14px); min-width: 210px; padding: 6px; border-radius: 16px;
  background: #fff; box-shadow: 0 20px 40px -16px rgba(18, 35, 61, 0.45); display: flex; flex-direction: column;
}
.dock-links-menu a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.dock-links-menu a span { flex: 1; }
.dock-links-menu a > svg:last-child { color: var(--muted); }
.dock-links-menu a:hover, .dock-links-menu a:focus-visible { background: var(--tint); }
.dock-links-menu a > svg:first-child { width: 20px; height: 20px; flex: none; color: var(--muted); }
.dock-links-menu a.is-active { background: var(--blue-soft); color: var(--blue-dark); }
.dock-links-menu a.is-active > svg:first-child { color: var(--blue); }
.dock-links-sep { height: 1px; margin: 6px 8px; background: var(--line); }
@media (max-width: 640px) {
  .dock-ext, .dock-sep, .dock-secondary { display: none; }
  .dock-links { display: block; }
  .dock { width: calc(100vw - 16px); max-width: 480px; justify-content: space-between; }
  .dock > .dock-item, .dock-links { flex: 1 1 0; min-width: 0; }
  .dock-item { width: auto; }
  .dock-links > .dock-item { width: 100%; }
}

.view-switch { position: fixed; left: 28px; bottom: 36px; z-index: 10; animation: dock-in-left .7s .25s cubic-bezier(.2, .8, .2, 1) both; }
.view-switch-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 14px;
  background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 14px 30px -18px rgba(18, 35, 61, 0.45); transition: transform .2s ease, background .2s ease;
}
.view-switch-btn:hover { transform: translateY(-3px); }
.view-switch-btn { white-space: nowrap; }
.vs-short { display: none; }
.view-switch-btn.is-previewing { background: #f7ebd3; color: #6b4a0e; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, 260px); grid-auto-rows: minmax(150px, auto); gap: 20px; }
.bento-box {
  border-radius: 28px; padding: 32px; background: #fff; color: var(--ink); text-decoration: none;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  animation: box-in .6s cubic-bezier(.2, .8, .2, 1) backwards; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}
a.bento-box:hover { color: var(--ink); transform: scale(1.03); box-shadow: 0 26px 44px -28px rgba(18, 35, 61, 0.45); }
.bento-text { display: flex; flex-direction: column; gap: 6px; }
.bento-text strong { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.bento-text span { font-size: 15px; color: var(--muted); }
.bento-notes { grid-row: span 2; padding: 36px; }
.bento-notes .bento-text strong { font-size: 38px; letter-spacing: -0.03em; }
.bento-program { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.bento-text .bento-program-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.bento-program .tm-program { color: var(--ink); }
.bento-program .tm-program-empty { font-size: 14px; color: var(--muted); }
.bento-lines { display: flex; flex-direction: column; gap: 10px; }
.bento-lines span { height: 12px; border-radius: 6px; background: var(--tint); transform-origin: left; animation: line-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.bento-lines span:nth-child(1) { width: 100%; background: var(--blue-soft); animation-delay: .3s; }
.bento-lines span:nth-child(2) { width: 82%; animation-delay: .4s; }
.bento-lines span:nth-child(3) { width: 90%; animation-delay: .5s; }
.bento-lines span:nth-child(4) { width: 64%; animation-delay: .6s; }
.bento-tasks { grid-column: span 2; flex-direction: row; align-items: center; background: var(--blue); color: #fff; animation-delay: .1s; }
a.bento-tasks:hover { color: #fff; }
.bento-tasks .bento-text span { color: var(--on-accent); }
.bento-tick { width: 120px; height: 120px; flex: none; border-radius: 30px; background: var(--accent-strong); display: flex; align-items: center; justify-content: center; }
.bento-tick path { stroke-dasharray: 24; animation: tick 3s ease-in-out infinite; }
.bento-people { animation-delay: .2s; }
.bento-avatars { display: flex; }
.bento-avatars .avatar { width: 44px; height: 44px; background: var(--blue-soft); border: 3px solid #fff; }
.bento-avatars .avatar + .avatar { margin-left: -14px; }
.bento-attendance { animation-delay: .3s; }
a.bento-absences:hover { transform: scale(1.012); }
.bento-absences { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 28px; animation-delay: .4s; }
.bento-away { width: 88px; height: 88px; flex: none; border-radius: 26px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.bento-away svg { width: 44px; height: 44px; }
.bento-absences .bento-text { flex: 0 1 280px; }
.bento-away-list { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.bento-away-list li { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; background: var(--tint); font-size: 14px; }
.bento-away-list li span { color: var(--muted); font-size: 13px; }
.bento-away-list .bento-away-more { justify-content: center; color: var(--muted); font-weight: 700; }
.bento-lights { display: flex; gap: 10px; }
.bento-lights span { width: 30px; height: 30px; border-radius: 50%; animation: light-pulse 3s ease-in-out infinite; }
.light-green { background: #3f9a68; }
.light-yellow { background: #e0a526; animation-delay: 1s !important; }
.light-red { background: #d0453a; animation-delay: 2s !important; }
@keyframes light-pulse { 0%, 30%, 100% { transform: scale(1); opacity: .55; } 12% { transform: scale(1.12); opacity: 1; } }
.att-checks { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.att-checks li { display: flex; align-items: center; gap: 10px; }
.bento-text .att-check { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; }
.att-checks .is-done .att-check { background: #2f9e5b; }
.att-checks .is-missing .att-check { background: #d64545; }
.bento-text .bento-note { font-size: 13px; font-weight: 700; color: var(--ink); }

/* The walker stands on the top edge of the first bento row (the negative margin cancels the .content gap); 100cqw is that row's width. */
.walker { --walk: 16s; --step: .5s; container-type: inline-size; height: 56px; margin-bottom: -27px; padding-inline: 20px; pointer-events: none; }
/* --walk is one crossing, the face/turn cycle is two; the member's speed in /app/nastaveni overrides both inline. */
.walker-move { display: block; width: 48px; animation: walk-across var(--walk) ease-in-out calc(var(--walk) / -16) infinite alternate; }
.walker-face { display: block; animation: walk-face calc(var(--walk) * 2) calc(var(--walk) / -16) step-end infinite; }
.wk-side { animation: wk-side calc(var(--walk) * 2) calc(var(--walk) / -16) linear infinite; }
.wk-front { opacity: 0; animation: wk-front calc(var(--walk) * 2) calc(var(--walk) / -16) linear infinite; }
.walker svg { display: block; overflow: visible; }
.wk-body { transform-origin: 24px 52px; animation: waddle var(--step) ease-in-out infinite alternate; }
.wk-foot-front { animation: step var(--step) ease-in-out infinite alternate; }
.wk-foot-back { animation: step var(--step) ease-in-out infinite alternate-reverse; }
.wk-wing { transform-origin: 16px 29px; animation: wing-swing var(--step) ease-in-out infinite alternate; }
.wk-scarf-tail { transform-origin: 12px 27px; animation: wing-swing var(--step) ease-in-out infinite alternate-reverse; }
.settings-card { padding: 22px; max-width: 640px; }
/* .field grows along a row elsewhere; in this column its 200px basis would become height. */
.settings-card > .field { flex: none; }
.settings-preview { position: relative; padding: 10px 0 0; border-bottom: 3px solid var(--line-strong); min-height: 66px; }
.settings-preview .walker { margin-bottom: 0; }
.settings-off { display: none; position: absolute; left: 0; bottom: 10px; }
.settings-preview.is-off .walker { display: none; }
.settings-preview.is-off .settings-off { display: block; }
.settings-options { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-option { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-weight: 700; cursor: pointer; }
.settings-option input { width: auto; height: auto; margin: 0; accent-color: var(--blue); }
.settings-option:has(input:checked), .settings-option[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
button.settings-option { font: inherit; font-weight: 700; color: var(--ink); transition: border-color .15s, background-color .15s; }
@media (hover: hover) { button.settings-option:hover { border-color: var(--blue); } }
button.settings-option:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.settings-option-hint { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.settings-option[aria-pressed="true"] .settings-option-hint { color: inherit; opacity: .75; }
.penguin-speed { display: flex; align-items: center; gap: 14px; }
.penguin-speed input[type="range"] { flex: 1; min-width: 0; height: 28px; padding: 0; border: 0; background: none; accent-color: var(--blue); }
.penguin-speed input[type="range"]:focus { outline-offset: 4px; }
.penguin-speed-num { position: relative; flex: none; width: 96px; }
.penguin-speed-num input { padding-right: 30px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.penguin-speed-num input { -moz-appearance: textfield; appearance: textfield; }
.penguin-speed-num input::-webkit-inner-spin-button, .penguin-speed-num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.penguin-speed-num span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); pointer-events: none; }
@keyframes walk-across { 0%, 4% { transform: translateX(0); } 96%, 100% { transform: translateX(calc(100cqw - 48px)); } }
/* Synced to walk-across (the pauses straddle 0% and 50%): a flat drawing can't rotate, so the penguin turns by
   cross-fading to a front view and back; the mirror flip happens while only the symmetric front view shows. */
@keyframes walk-face { 0% { transform: none; } 50% { transform: scaleX(-1); } }
@keyframes wk-side { 0%, 0.6%, 49.4%, 50.6%, 99.4%, 100% { opacity: 0; } 1.6%, 48.4%, 51.6%, 98.4% { opacity: 1; } }
@keyframes wk-front { 0%, 0.6%, 49.4%, 50.6%, 99.4%, 100% { opacity: 1; } 1.6%, 48.4%, 51.6%, 98.4% { opacity: 0; } }
@keyframes waddle { from { transform: rotate(-5deg); } to { transform: rotate(5deg) translateY(-1px); } }
@keyframes step { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }
@keyframes wing-swing { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.empty { padding: 32px; color: var(--muted); }

.member-grid { align-items: start; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.member-card { padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
@media (min-width: 640px) { .member-card:has(.member-edit[open]) { grid-column: span 2; } }
.team-role { padding: 4px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: 13px; font-weight: 700; }
.team-role-empty { background: none; border: 1.5px dashed var(--line-strong); color: var(--muted); font-weight: 600; }
.member-edit { width: 100%; display: flex; flex-direction: column; align-items: center; }
.member-edit summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer; }
.member-edit summary::-webkit-details-marker { display: none; }
.member-edit[open] summary { background: var(--blue-soft); }
.member-edit-form { width: 100%; margin-top: 14px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.member-edit-form .field { flex: none; }
.member-edit-form .btn { align-self: stretch; }
.danger { color: #b3261e; }
.tm-hero { position: relative; margin-top: 40px; }
.tm-hero-card { position: relative; z-index: 1; padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; border-radius: 28px; }
.tm-hero-text h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.tm-hero-text p { margin-top: 4px; }
.tm-new > summary { list-style: none; }
.tm-new > summary::-webkit-details-marker { display: none; }
.tm-new .when-open, .tm-new[open] .when-closed { display: none; }
.tm-new[open] .when-open { display: inline; }
.tm-new[open] { flex: 1 1 100%; display: flex; flex-direction: column; gap: 16px; }
.tm-new > summary { align-self: flex-end; }
.tm-new[open] > summary { background: var(--blue-soft); color: var(--blue-dark); }
.tm-new .tm-new-form { width: 100%; padding: 0; animation: fade-in .3s ease both; }
.tm-new .alert { align-self: stretch; }
.tm-edit { padding: 16px 20px; }
.tm-edit:not([open]) { padding: 0; background: none; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; align-self: flex-start; }
.tm-edit > summary, .tm-edit[open] > summary { align-self: flex-start; }
.tm-next-edit, .tm-next-edit:hover { align-self: center; font-weight: 700; color: #fff; }
.tm-next-edit { opacity: .85; }
.tm-next-edit:hover, .tm-next-edit:focus-visible { opacity: 1; text-decoration-thickness: 2px; }
.tm-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.peeker { position: absolute; right: 72px; bottom: calc(100% - 30px); width: 96px; height: 84px; }
.peeker-head { position: absolute; inset: 0; transform-origin: 50% 100%; animation: peek 9s cubic-bezier(.4, 0, .2, 1) infinite; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.peeker-hands { position: absolute; left: 0; bottom: 22px; z-index: 2; animation: peek-hands 9s ease infinite; }
.peeker-eyes { transform-origin: 48px 53px; animation: blink 4.5s infinite; }
.peeker-pupils { animation: peek-look 9s ease-in-out infinite; }
.tm-hero:has(.peeker:hover) .peeker-head, .peeker:hover .peeker-head { animation: none; transform: translateY(-12px) rotate(-4deg); }
.peeker:hover .peeker-hands { animation: none; opacity: 1; }
.peeker-bubble {
  position: absolute; right: 88%; bottom: 70%; padding: 8px 14px; border-radius: 16px 16px 4px 16px; background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 14px 30px -16px rgba(18, 35, 61, 0.45); z-index: 3;
  opacity: 0; transform: scale(.6); transform-origin: bottom right; pointer-events: none; transition: opacity .2s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.peeker:hover .peeker-bubble { opacity: 1; transform: scale(1); }
@keyframes peek { 0%, 14% { transform: translateY(78%); } 22% { transform: translateY(-6%); } 26%, 62% { transform: translateY(0); } 34% { transform: translateY(0) rotate(-6deg); } 42% { transform: translateY(0) rotate(5deg); } 50% { transform: translateY(0); } 70%, 100% { transform: translateY(78%); } }
@keyframes peek-hands { 0%, 16% { opacity: 0; transform: translateY(8px); } 22%, 64% { opacity: 1; transform: none; } 70%, 100% { opacity: 0; transform: translateY(8px); } }
@keyframes peek-look { 0%, 28%, 56%, 100% { transform: none; } 32%, 40% { transform: translateX(-3px); } 44%, 52% { transform: translateX(3px); } }

.date-tile { width: 58px; height: 62px; flex: none; border-radius: 16px; background: var(--blue-soft); color: var(--blue-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.date-tile strong { font-size: 24px; font-weight: 800; }
.date-tile span { margin-top: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.date-tile-light { width: 96px; height: 104px; border-radius: 24px; background: rgba(255, 255, 255, .14); color: #fff; }
.date-tile-light strong { font-size: 42px; }
.date-tile-light span { font-size: 14px; }

.progress { display: block; width: 100%; height: 8px; border-radius: 999px; background: #e6edf7; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transform-origin: left; animation: line-in .9s .3s cubic-bezier(.2, .8, .2, 1) both; }

.tm-next {
  position: relative; overflow: hidden; padding: 28px; border-radius: 28px; color: #fff;
  background: linear-gradient(135deg, #2f5fa3 0%, #1c3f73 100%); display: grid; grid-template-columns: auto minmax(0, 1fr) 240px; gap: 28px; align-items: center;
  animation: box-in .6s .1s cubic-bezier(.2, .8, .2, 1) backwards; box-shadow: 0 30px 50px -34px rgba(18, 35, 61, .7);
}
.tm-next::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.tm-next-kicker { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #bcd0ec; }
.tm-next-info h2 { margin-top: 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.tm-next-info h2::first-letter { text-transform: uppercase; }
.tm-next-info a, .tm-next-info a:hover { color: #fff; text-decoration: none; }
.tm-next-info p { margin-top: 6px; color: var(--on-accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-program-title { margin-top: 14px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #bcd0ec; }
.tm-program { margin: 6px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.tm-program-more { list-style: none; margin-left: -1.2em; color: var(--muted); font-size: 14px; }
.tm-next .tm-program-more, .tm-next .tm-program-empty { color: var(--on-accent); }
.tm-program-empty { margin-top: 6px; }
.tm-next-side { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.tm-next-avatars { display: flex; min-height: 34px; }
.tm-next-avatars .avatar { width: 34px; height: 34px; font-size: 13px; background: var(--blob-1); border: 2px solid var(--accent-edge); }
.tm-next-avatars .avatar + .avatar { margin-left: -10px; }
.tm-next-count { font-size: 14px; color: var(--on-accent); }
.tm-next-count strong { color: #fff; font-size: 16px; }
.tm-next .progress { background: rgba(255, 255, 255, .18); }
.tm-next .progress > span { background: #8fd1a8; }
.tm-next-btn { width: 100%; background: #fff; color: var(--blue-dark); font-weight: 800; }
.tm-next-btn:hover { background: var(--tint); color: var(--blue-dark); }
.tm-next-btn.is-done { background: rgba(255, 255, 255, .14); color: #fff; }

.tm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tm-row { padding: 14px 20px 14px 14px; display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--ink); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.tm-row:hover { color: var(--ink); transform: translateX(4px); box-shadow: 0 18px 34px -24px rgba(18, 35, 61, .45); }
.tm-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tm-row-info strong::first-letter { text-transform: uppercase; }
.tm-item { position: relative; }
.tm-row.has-edit { padding-right: 64px; }
.tm-row-edit { position: absolute; top: 50%; right: 14px; translate: 0 -50%; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--muted-2); background: var(--tint); transition: background .2s ease, color .2s ease; }
.tm-row-edit:hover, .tm-row-edit:focus-visible { color: #fff; background: var(--blue); }
.tm-item:has(.tm-row-edit:hover) .tm-row { transform: none; box-shadow: none; }
.tm-row-progress { width: 150px; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.tm-past-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tm-past { height: 100%; box-sizing: border-box; padding: 18px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--ink); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.tm-past:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 34px -24px rgba(18, 35, 61, .45); }
.tm-past-head { display: flex; align-items: center; gap: 12px; }
.tm-past-head > span:last-child { display: flex; flex-direction: column; text-transform: capitalize; }
.tm-past .date-tile { width: 46px; height: 50px; border-radius: 13px; background: #eef2f8; color: var(--muted); }
.tm-past .date-tile strong { font-size: 19px; }
.tm-past-excerpt { font-size: 14px; color: var(--muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tm-empty { text-align: center; }

.section-title { font-size: 18px; font-weight: 800; }
.add-form .field-full { flex: 1 1 100%; }
textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-soft); font: inherit; color: inherit; resize: vertical; }
textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--blue); }
.back-link { font-weight: 700; text-decoration: none; }
.meeting-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.meeting-attend, .meeting-notes { padding: 24px; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
.tasks-hero { margin-top: 32px; padding: 26px 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; border-radius: 24px; }
.tasks-hero h1 { margin: 0 0 4px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.tasks-hero p { margin: 0; }
.task-add { flex: 1 1 100%; display: flex; gap: 8px; }
.task-add input { height: 42px; }
.task-board { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.task-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.task-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.task-tab[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.task-tab[aria-pressed="true"] .board-count { background: rgba(255, 255, 255, .2); border-color: transparent; color: #fff; }
.task-board .is-filtered { display: none; }
.task-person { width: auto; max-width: 100%; height: auto; padding: 7px 14px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 700; }
.task-board[data-view="gantt"] .task-group-toggle { display: none; }
.task-group-head { margin-top: 6px; padding: 0 2px; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted-2); }
.task-group-head:first-child { margin-top: 0; }
.task-row[data-priority="high"], .gantt-bar[data-priority="high"], .task-prio-high { --prio: #d0453a; --prio-ink: #a3291f; }
.task-row[data-priority="medium"], .gantt-bar[data-priority="medium"], .task-prio-medium { --prio: #e0a526; --prio-ink: #8a5d00; }
.task-row[data-priority="low"], .gantt-bar[data-priority="low"], .task-prio-low { --prio: #4caf6a; --prio-ink: #2c7a45; }
.task-row[data-priority]:not([data-priority=""]) {
  background: color-mix(in srgb, var(--prio) 9%, var(--surface)); border-color: color-mix(in srgb, var(--prio) 32%, var(--line));
  box-shadow: inset 4px 0 0 var(--prio);
}
.task-row[data-priority]:not([data-priority=""]):hover { border-color: color-mix(in srgb, var(--prio) 55%, var(--line)); }
.task-row.task-done[data-priority] { background: var(--surface); border-color: var(--line); box-shadow: none; }
.gantt-who .task-prio { font-weight: 800; color: var(--prio-ink); }
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task-row { display: flex; align-items: center; gap: 4px; padding-left: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.task-row:hover { border-color: var(--line-strong); }
.task-row.is-busy { opacity: .5; }
/* Tasks created since the page loaded (tasks.client.js); the mark goes away with a reload. */
.task-row.is-new, .gantt-bar.is-new, .gantt-undated-item.is-new { outline: 2px solid var(--blue); outline-offset: 2px; animation: new-ring .9s cubic-bezier(.2, .8, .2, 1); }
.task-row.is-new .task-title::after {
  content: 'Nový'; display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; vertical-align: 2px;
}
.gantt-label.is-new { background: var(--tint); box-shadow: inset 3px 0 0 var(--blue); }
@keyframes new-ring { from { outline-offset: 10px; outline-color: transparent; } to { outline-offset: 2px; outline-color: var(--blue); } }
.task-check {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--surface); color: transparent; cursor: pointer;
}
.task-check:hover { border-color: #3f9a68; color: #3f9a68; }
.task-done .task-check { background: #3f9a68; border-color: #3f9a68; color: #fff; }
.task-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px 8px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: 14px; }
.task-open:focus-visible { outline-offset: -3px; }
.task-title { font-weight: 700; overflow-wrap: anywhere; }
.task-done .task-title { color: var(--muted-2); text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted-2); }
.task-who { display: inline-flex; align-items: center; gap: 6px; }
.avatar.avatar-xs { width: 20px; height: 20px; font-size: 11px; background: var(--blue-soft); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.task-assignees { position: relative; }
.task-assignees > summary {
  display: flex; align-items: center; min-height: 42px; padding: 8px 36px 8px 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface-soft); cursor: pointer; list-style: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.task-assignees > summary::-webkit-details-marker { display: none; }
.task-assignees > summary::after { content: "▾"; position: absolute; right: 14px; color: var(--muted-2); }
.task-assignees > summary span { overflow: hidden; text-overflow: ellipsis; }
.task-assignees-list {
  position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; min-width: max(100%, 230px);
  display: flex; flex-direction: column; gap: 2px; padding: 6px; max-height: 260px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 30px -18px rgba(18, 35, 61, .45);
}
.task-assignees-list label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.task-assignees-list label:hover { background: var(--surface-soft); }
.task-assignees-list .task-assignees-all { margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; padding-bottom: 8px; font-weight: 700; }
.task-assignees-list input[type="checkbox"], .personality-file-remove input[type="checkbox"], .feedback-anon input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--blue); }
.task-due.is-late { color: #b3261e; font-weight: 700; }
.task-due.is-soon { color: #9a5b00; font-weight: 700; }
.task-nodate { color: #b3261e; font-weight: 700; }
.task-prio::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; vertical-align: 1px; }
.task-prio::before { background: var(--prio); }
.task-meta .task-prio { font-weight: 800; color: var(--prio-ink); }
.task-area { padding: 1px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; font-size: 12px; }
.task-done-list summary { display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; font-weight: 700; cursor: pointer; }
.task-done-list[open] summary { margin-bottom: 8px; }
.task-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.task-fields select, .task-fields input { height: 42px; }
.task-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.task-board[data-view="list"] .task-gantt-view, .task-board[data-view="gantt"] .task-list-view { display: none; }
.task-list-view, .task-gantt-view { display: flex; flex-direction: column; gap: 12px; }
.gantt-undated { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; }
.gantt-undated[hidden] { display: none; }
.gantt-undated-item { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.gantt-undated-item:hover { border-color: var(--blue); }
/* Gantt: a sticky label column plus one grid column per day; tracks are subgrids so bars align with the day header. */
.gantt { --day: 30px; --label: 190px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.gantt-grid { position: relative; display: grid; grid-template-columns: var(--label) calc(var(--days) * var(--day)); width: max-content; }
.gantt-corner { grid-row: span 2; position: sticky; left: 0; z-index: 4; display: flex; align-items: flex-end; padding: 8px 12px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted-2); }
.gantt-months, .gantt-days, .gantt-track { display: grid; grid-template-columns: repeat(var(--days), var(--day)); }
.gantt-months span { padding: 8px 8px 2px; overflow: clip; white-space: nowrap; font-size: 13px; font-weight: 800; border-left: 1px solid var(--line); }
/* The month name stays visible while its span is scrolled partly under the label column (overflow: clip, not
   hidden, on the span: hidden would make the span the sticky container). */
.gantt-months b { position: sticky; left: calc(var(--label) + 8px); }
.gantt-days { border-bottom: 1px solid var(--line); }
.gantt-days span { padding: 2px 0 6px; text-align: center; font-size: 12px; color: var(--muted-2); }
.gantt-days .is-weekend { color: #a6b0bf; }
.gantt-days .is-today { color: #fff; background: var(--blue); border-radius: 8px; font-weight: 800; }
.gantt-label {
  position: sticky; left: 0; z-index: 3; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 0 0 10px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface);
}
.gantt-label:hover { background: var(--surface-soft); }
.gantt-label.is-busy { opacity: .5; }
.gantt-open {
  flex: 1; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; padding: 8px 12px 8px 0;
  border: 0; background: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer;
}
.gantt-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 700; }
.gantt-who { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--muted-2); }
.gantt-track {
  align-items: center; min-height: 48px; border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to right, transparent calc(var(--today) * var(--day) + var(--day) / 2 - 1px), var(--blue) 0, var(--blue) calc(var(--today) * var(--day) + var(--day) / 2 + 1px), transparent 0),
    repeating-linear-gradient(to right, transparent 0 calc(5 * var(--day)), #f3f5f9 0 calc(7 * var(--day)));
}
.gantt-bar {
  position: relative; z-index: 2; display: flex; align-items: center; height: 28px; margin: 0 2px; border-radius: 8px; background: #8aa6cf; color: #fff;
  font-size: 12px; font-weight: 700; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.gantt-bar-text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 4px; pointer-events: none; }
/* A bar of one or two days can't fit its title, so the title sits right of the bar (past the link dot). */
.gantt-bar.is-short .gantt-bar-text {
  position: absolute; left: calc(100% + 18px); top: 50%; transform: translateY(-50%); overflow: visible; padding: 1px 6px; border-radius: 6px;
  background: var(--surface); color: var(--ink);
}
.gantt-bar.is-dragging { cursor: grabbing; box-shadow: 0 6px 16px -6px rgba(18, 35, 61, .55); }
.gantt-bar.is-target { outline: 3px solid var(--focus); outline-offset: 1px; }
/* Resize handles on both ends and the dependency dot past the end; shown on hover (always on touch screens). */
.gantt-handle { flex: none; align-self: stretch; width: 8px; cursor: ew-resize; border-radius: 8px; }
.gantt-bar:hover .gantt-handle { background: rgba(255, 255, 255, .28); }
.gantt-link {
  position: absolute; top: 50%; right: -14px; width: 12px; height: 12px; margin-top: -6px; border: 2px solid var(--blue); border-radius: 50%;
  background: var(--surface); cursor: crosshair; opacity: 0; transition: opacity .15s ease; touch-action: none;
}
.gantt-bar:hover .gantt-link, .gantt-bar:focus-visible .gantt-link { opacity: 1; }
@media (hover: none) { .gantt-link { opacity: 1; } }
.gantt-links { position: absolute; top: 0; left: 0; z-index: 1; overflow: visible; pointer-events: none; }
.gantt-links path { fill: none; stroke: #23365a; stroke-width: 2.2; stroke-linejoin: round; }
.gantt-links .gantt-arrow-halo { stroke: var(--surface); stroke-width: 6; }
.gantt-links .gantt-arrow-line.is-late { stroke: #a3291f; stroke-dasharray: 6 4; }
.gantt-links .gantt-link-preview { stroke: var(--blue); stroke-dasharray: 5 4; }
.gantt-links .gantt-arrow { transition: opacity .15s; }
.gantt-links.has-focus .gantt-arrow:not(.is-hot) { opacity: .15; }
.gantt-links.has-focus .gantt-arrow-line.is-hot { stroke-width: 3; }
#gantt-arrow path { fill: #23365a; stroke: none; }
#gantt-arrow-late path { fill: #a3291f; stroke: none; }
.task-flash { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.task-flash[hidden] { display: none; }
.task-flash .task-undo { color: inherit; text-decoration: underline; }
.task-trash { margin-top: 6px; }
.task-history-changes { margin: 0; padding: 0; list-style: none; color: var(--muted-2); display: flex; flex-direction: column; gap: 2px; }
.topic-history-list .task-history-changes li { padding: 0; border: 0; }
.task-undo[hidden] { display: none; }
.task-deps { display: flex; flex-direction: column; gap: 8px; }
.task-dep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.task-dep-list:empty { display: none; }
.task-dep { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: 13px; font-weight: 600; }
.task-dep-remove { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.task-dep-remove:hover { background: rgba(28, 63, 115, .12); }
.task-dep-error { margin: 0; color: #a33a2b; font-weight: 600; }
.task-deps select { height: 42px; }
.gantt-bar:hover { filter: brightness(.92); }
.gantt-doing { background: var(--blue); }
.gantt-done { background: #3f9a68; opacity: .55; }
.gantt-bar.is-late { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #c4442f; }
/* A set priority fills the whole bar (darker shades keep the white text readable, a not-started task is a bit
   lighter than one in progress); done tasks keep the faded green. Late is a red ring, not a fill, so it never reads
   as "high". */
.gantt-bar[data-priority="high"]:not(.gantt-done) { --bar: #c8473d; }
.gantt-bar[data-priority="medium"]:not(.gantt-done) { --bar: #c48a12; }
.gantt-bar[data-priority="low"]:not(.gantt-done) { --bar: #3f9a5c; }
.gantt-bar[data-priority]:not([data-priority=""], .gantt-done) { background: color-mix(in srgb, var(--bar) 78%, #fff); }
.gantt-bar.gantt-doing[data-priority]:not([data-priority=""]) { background: var(--bar); }
@media (max-width: 600px) { .gantt { --label: 128px; --day: 26px; } }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.board-status[data-state="error"] { color: #a33a2b; font-weight: 600; }
/* Search filters the cards of all columns (topics.client.js); while it is active the counts show matches. */
.board-search { position: relative; display: flex; align-items: center; max-width: 360px; }
.board-search svg { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.board-search input { width: 100%; padding-left: 38px; }
.topic-card[hidden] { display: none; }
/* Four columns on wide screens; below that a horizontal strip that snaps column by column. */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col {
  display: flex; flex-direction: column; gap: 10px; min-height: 160px; padding: 12px; border-radius: 16px;
  background: var(--surface-soft); border: 1px solid var(--line); transition: border-color .15s ease, background .15s ease;
}
.board-col.is-over { border-color: var(--blue); background: var(--blue-soft); }
.board-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 0; }
.board-col-head h3 { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.3; }
.board-col-head h3::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; }
.board-col-idea h3::before { background: #e0a526; }
.board-col-next h3::before { background: var(--blue); }
.board-col-done h3::before { background: #3f9a68; }
.board-col-parked h3::before { background: #8a96a8; }
.board-count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700; text-align: center; color: var(--muted); }
/* Long columns scroll on their own, so the header and the add field stay in view with a hundred topics. */
.board-cards {
  list-style: none; margin: 0 -4px; padding: 2px 4px 4px; display: flex; flex-direction: column; gap: 8px; min-height: 8px;
  max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain;
}
.topic-card {
  display: flex; align-items: stretch; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 6px 14px -12px rgba(18, 35, 61, .5); cursor: grab; transition: background .15s ease, border-color .15s ease;
}
.topic-card:hover { border-color: var(--line-strong); }
.topic-card[data-priority="high"] { --prio: #d0453a; --prio-ink: #a3291f; }
.topic-card[data-priority="medium"] { --prio: #e0a526; --prio-ink: #8a5d00; }
.topic-card[data-priority="low"] { --prio: #4caf6a; --prio-ink: #2c7a45; }
.topic-card[data-priority]:not([data-priority=""]) {
  background: color-mix(in srgb, var(--prio) 9%, var(--surface)); border-color: color-mix(in srgb, var(--prio) 32%, var(--line));
  box-shadow: inset 4px 0 0 var(--prio), 0 6px 14px -12px rgba(18, 35, 61, .5);
}
.topic-card[data-priority]:not([data-priority=""]):hover { border-color: color-mix(in srgb, var(--prio) 55%, var(--line)); }
.topic-prio { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--prio-ink); }
.topic-prio::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--prio); }
.topic-prio:empty { display: none; }
/* Up/down arrows: shown on hover/focus with a mouse, always on touch screens (no drag and drop there). */
.topic-order { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 6px 6px 0; }
.topic-step {
  display: grid; place-items: center; width: 26px; height: 24px; padding: 0; border: 0; border-radius: 7px;
  background: none; color: var(--muted-2); cursor: pointer; transition: background .12s ease, color .12s ease, opacity .12s ease;
}
.topic-step:hover { background: var(--blue-soft); color: var(--blue); }
.board-cards > .topic-card:first-child .topic-step[data-step="-1"], .board-cards > .topic-card:last-child .topic-step[data-step="1"] { visibility: hidden; }
@media (hover: hover) {
  .topic-step { opacity: 0; }
  .topic-card:hover .topic-step, .topic-card:focus-within .topic-step { opacity: 1; }
}
.topic-card.is-dragging { opacity: .4; }
.board-col-done .topic-title { color: var(--muted); }
.topic-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.topic-open { border-radius: 11px; }
.topic-open:focus-visible { outline-offset: -3px; }
.topic-title { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.topic-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.45; color: var(--muted-2); white-space: pre-line; overflow-wrap: anywhere; }
.topic-desc:empty { display: none; }
.board-add input { height: 40px; border-style: dashed; background: transparent; font-size: 14px; }
.board-add input:focus { border-style: solid; background: var(--surface); }
.topic-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 22px; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 30px 60px -20px rgba(18, 35, 61, .5); }
.topic-dialog::backdrop { background: rgba(18, 35, 61, .35); }
.topic-dialog-head { display: flex; align-items: center; gap: 10px; }
.topic-dialog-head h2 { margin: 0; }
.topic-save { margin-left: auto; }
.topic-save[data-state="error"] { color: #a33a2b; font-weight: 600; }
/* A plain div, not fieldset/legend: Safari miscalculates a flex fieldset's height and the buttons overlap what follows. */
.topic-move { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-move-btn { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.topic-move-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
/* Darker than the row tints so white text on a pressed button stays readable. */
.topic-priority .task-prio-high { --prio: #d0453a; }
.topic-priority .task-prio-medium { --prio: #c48a12; }
.topic-priority .task-prio-low { --prio: #3f9a5c; }
.topic-priority .task-prio[aria-pressed="true"] { background: var(--prio); border-color: var(--prio); }
.topic-priority .task-prio[aria-pressed="true"]::before { background: #fff; }
.topic-dialog-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.topic-dialog-foot .topic-meta { flex: 1 1 220px; margin: 0; }
/* Nothing in the dialog may grow or shrink: Safari otherwise redistributes height between the textarea and the
   wrapping column buttons whenever focus moves, so the pills stretch and the layout jumps. */
.topic-dialog form > * { flex: none; }
.rte.rte-compact { min-height: 160px; }
/* The dialog focuses its form on open (autofocus), so no field shows a focus ring until the user picks one. */
.topic-dialog form:focus { outline: none; }
@media (max-width: 1000px) {
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .board-col { flex: 0 0 min(280px, 82%); scroll-snap-align: start; }
}
.rte-wrap { display: flex; flex-direction: column; gap: 10px; }
.rte-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.rte-status { font-size: 13px; color: var(--muted-2); }
.rte-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #3f9a68; vertical-align: 1px; }
.rte-status[data-state="dirty"]::before, .rte-status[data-state="saving"]::before { background: #d39b2a; }
.rte-status[data-state="error"] { color: #a33a2b; font-weight: 600; }
.rte-status[data-state="error"]::before { background: #c4442f; }
/* Sticky so the formatting buttons stay reachable while scrolling long notes (and above the phone keyboard). */
.rte-toolbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; display: flex; gap: 6px; overflow-x: auto;
  padding: 6px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px;
}
/* Small always-visible scrollbars where content overflows (toolbar, long columns, the board strip on phones), so
   it is obvious there is more. Only the -webkit- pseudo-elements keep them visible on macOS; setting
   scrollbar-width/scrollbar-color would switch Chrome and Safari back to auto-hiding overlay bars. */
.rte-toolbar::-webkit-scrollbar, .board-cards::-webkit-scrollbar, .board::-webkit-scrollbar { width: 6px; height: 6px; }
.rte-toolbar::-webkit-scrollbar-track, .board-cards::-webkit-scrollbar-track, .board::-webkit-scrollbar-track { background: transparent; }
.rte-toolbar::-webkit-scrollbar-thumb, .board-cards::-webkit-scrollbar-thumb, .board::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--line-strong); }
.rte-toolbar::-webkit-scrollbar-thumb:hover, .board-cards::-webkit-scrollbar-thumb:hover, .board::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
.rte-group { display: flex; gap: 2px; flex: none; }
.rte-group + .rte-group { padding-left: 6px; border-left: 1px solid var(--line); }
.rte-btn {
  min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.rte-btn:hover { background: var(--blue-soft); }
.rte-btn.is-active { background: var(--blue); color: #fff; }
.rte-italic { font-style: italic; font-family: Georgia, serif; }
.rte-underline { text-decoration: underline; }
.rte-strike { text-decoration: line-through; }
.rte-code, .rte-codeblock { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.rte {
  min-height: 320px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-soft);
  position: relative; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; outline: none;
}
.rte:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus); }
.rte.is-empty::before { content: attr(data-placeholder); position: absolute; top: 14px; left: 16px; right: 16px; color: var(--muted-2); pointer-events: none; }
.rte > :first-child { margin-top: 0; }
.rte p { margin: 0 0 4px; }
.rte h1 { margin: 22px 0 6px; font-size: 26px; line-height: 1.25; }
.rte h2 { margin: 18px 0 4px; font-size: 21px; line-height: 1.3; }
.rte h3 { margin: 14px 0 2px; font-size: 17px; line-height: 1.35; }
.rte ul, .rte ol { margin: 0 0 6px; padding-left: 26px; }
.rte li { margin: 2px 0; }
.rte ul.todo { list-style: none; padding-left: 4px; }
.rte ul.todo > li { position: relative; padding-left: 28px; }
.rte ul.todo > li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-radius: 5px;
  background: var(--surface); cursor: pointer;
}
.rte ul.todo > li[data-checked] { color: var(--muted-2); text-decoration: line-through; }
.rte ul.todo > li[data-checked]::before {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.rte blockquote { margin: 6px 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--ink); }
.rte code { padding: 1px 5px; border-radius: 5px; background: #e9eef6; color: #b0303a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.rte pre { margin: 6px 0; padding: 12px 14px; border-radius: 10px; background: #eef2f8; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; white-space: pre-wrap; }
.rte pre code { padding: 0; background: none; color: inherit; }
.rte hr { margin: 14px 0; border: 0; border-top: 1px solid var(--line-strong); }
.rte a { color: var(--blue); text-decoration: underline; }
.attend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.attend-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; opacity: .55; }
.attend-list li.is-in { opacity: 1; }
.attend-list li .small { margin-left: auto; font-weight: 500; }
.attend-list .avatar { width: 32px; height: 32px; font-size: 13px; background: var(--blue-soft); }
.prewrap { white-space: pre-wrap; margin: 0; }
.delete-meeting { margin-top: 8px; }
.member-email { max-width: 100%; padding: 4px 10px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: break-word; }

@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -20px); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes box-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes line-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dock-in { from { opacity: 0; transform: translate(-50%, 40px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes dock-in-left { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes tick { 0%, 60% { stroke-dashoffset: 24; } 80%, 100% { stroke-dashoffset: 0; } }

.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.badge-blue { color: var(--blue-dark); background: var(--blue-soft); }
.badge-green { color: #1e5a3a; background: #ddf1e5; }
.badge-amber { color: #6b4a0e; background: #f7ebd3; }

.alert { padding: 12px 16px; border-radius: 12px; background: #fbe3e3; color: #7a1f1f; font-weight: 600; }
.notice { padding: 12px 16px; border-radius: 12px; background: #ddf1e5; color: #1e5a3a; font-weight: 600; }
.add-form { padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.field { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field-wide { flex: 2 1 260px; }
.field-narrow { flex: 0 1 140px; }

.buddy { position: fixed; right: 40px; bottom: 24px; z-index: 9; width: 112px; animation: buddy-in 1s .9s cubic-bezier(.2, .8, .2, 1) both; }
.buddy-hop { display: block; transform-origin: 50% 100%; }
.buddy svg { display: block; width: 100%; height: auto; overflow: visible; }
.buddy:hover .buddy-hop { animation: hop .9s cubic-bezier(.3, .7, .4, 1); }
.pg-sway { transform-origin: 60px 126px; animation: sway 3.4s ease-in-out infinite; }
.pg-bob { animation: bob 2.4s ease-in-out infinite; }
.pg-shadow { transform-origin: 60px 132px; animation: shadow 2.4s ease-in-out infinite; }
.pg-eyes { transform-origin: 60px 53px; animation: blink 5s infinite; }
.pg-pupils { animation: look 9s ease-in-out infinite; }
.pg-wing-l { transform-origin: 26px 70px; animation: flap-l 3.4s ease-in-out infinite; }
.pg-wing-r { transform-origin: 94px 70px; animation: wave-idle 8s ease-in-out infinite 2s; }
.pg-scarf-tail { transform-origin: 78px 80px; animation: scarf 3.4s ease-in-out infinite; }
.buddy:hover .pg-wing-r { animation: wave .45s ease-in-out infinite; }
.buddy:hover .pg-wing-l { animation: wave-l .45s ease-in-out infinite; }
.buddy-bubble {
  position: absolute; right: 70%; bottom: 92%; padding: 8px 14px; border-radius: 16px 16px 4px 16px; background: #fff;
  color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 14px 30px -16px rgba(18, 35, 61, 0.45);
  transform-origin: bottom right; opacity: 0; transform: scale(.6); pointer-events: none;
  animation: bubble 3.6s 2s cubic-bezier(.34, 1.56, .64, 1) both; transition: opacity .2s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.buddy:hover .buddy-bubble { animation: none; opacity: 1; transform: scale(1); }
@keyframes buddy-in { from { opacity: 0; transform: translateX(160px); } to { opacity: 1; transform: none; } }
@keyframes hop { 0%, 100% { transform: none; } 20% { transform: scale(1.06, .92); } 45% { transform: translateY(-26px) scale(.96, 1.05); } 70% { transform: scale(1.05, .95); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.88); opacity: .7; } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes look { 0%, 40%, 100% { transform: none; } 45%, 60% { transform: translateX(-2px); } 65%, 80% { transform: translateX(2px); } }
@keyframes flap-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
@keyframes wave-idle { 0%, 82%, 100% { transform: rotate(0); } 85%, 91% { transform: rotate(-70deg); } 88%, 94% { transform: rotate(-45deg); } }
@keyframes wave { 0%, 100% { transform: rotate(-70deg); } 50% { transform: rotate(-40deg); } }
@keyframes wave-l { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(25deg); } }
@keyframes scarf { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg); } }
@keyframes bubble { 0% { opacity: 0; transform: scale(.6); } 12%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.6); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (hover: none) {
  .dock { gap: 2px; padding: 8px; }
  .dock-item { width: 62px; height: 58px; flex-direction: column; gap: 3px; }
  .dock-item:hover, .dock-item:focus-visible { transform: none; }
  .dock-item:not(.is-active):hover { background: none; color: var(--muted); }
  .dock-label, .dock-item:hover .dock-label, .dock-item:focus-visible .dock-label {
    position: static; padding: 0; background: none; color: inherit; font-size: 10.5px; font-weight: 700;
    white-space: normal; text-align: center; line-height: 1.1;
    opacity: 1; transform: none; transition: none;
  }
  .dock-label::after { content: none; }
}
@media (hover: none) and (max-width: 640px) {
  .dock { gap: 0; padding: 6px; }
  .dock > .dock-item, .dock-links { flex: 1 1 0; min-width: 0; }
  .dock-item { padding: 0 3px; }
  .dock-label-long { display: none; }
  .dock-label-short { display: inline; }
  .dock-label, .dock-item:hover .dock-label, .dock-item:focus-visible .dock-label { font-size: clamp(9px, 2.7vw, 10.5px); }
}

@media (max-width: 860px) {
  .tm-next { grid-template-columns: auto minmax(0, 1fr); }
  .tm-next-side { grid-column: 1 / -1; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .bento-box { min-height: 180px; }
  .bento { grid-template-rows: none; }
  .bento-notes, .bento-tasks, .bento-absences { grid-row: auto; grid-column: auto; }
  .bento-absences { flex-direction: column; align-items: flex-start; gap: 16px; }
  .bento-absences .bento-text { flex: none; }
  .bento-away { width: 64px; height: 64px; border-radius: 20px; }
  .bento-away-list { margin: 0; justify-content: flex-start; }
  .bento-tick { width: 88px; height: 88px; }
}

@media (max-width: 860px) {
  .meeting-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .app-header, .content { padding-inline: 16px; }
  .user-meta { display: none; }
  .content { padding-bottom: 190px; }
  .view-switch { position: static; animation: none; }
  .peeker { right: 28px; transform: scale(.8); transform-origin: bottom right; }
  .tm-hero-card { padding: 22px; }
  .tm-hero-text h1 { font-size: 28px; }
  .tm-next { padding: 22px; gap: 18px; }
  .date-tile-light { width: 72px; height: 80px; }
  .date-tile-light strong { font-size: 32px; }
  .tm-next-info h2 { font-size: 22px; }
  .tm-row-progress { width: 76px; }
  .buddy { right: 14px; bottom: 108px; width: 64px; }
  .buddy-bubble { font-size: 13px; }
  .vs-long { display: none; }
  .vs-short { display: inline; }
  .view-switch-btn { height: 38px; padding: 0 12px; font-size: 13px; box-shadow: none; }
  .login-card, .center-card { padding: 28px 20px; }
}

/* "Zobrazit jako…" menu (admins): opens upwards from the fixed bottom-left button, downwards in the phone header. */
.view-menu { position: fixed; }
.view-menu summary { list-style: none; }
.view-menu summary::-webkit-details-marker { display: none; }
.view-menu-list { position: absolute; left: 0; bottom: calc(100% + 8px); display: flex; flex-direction: column; min-width: 210px; padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 18px 40px -16px rgba(18, 35, 61, .45); }
.view-menu-list button, .view-menu-list a { padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.view-menu-list button:hover, .view-menu-list a:hover { background: var(--blue-soft); }
.member-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

/* Attendance */
.att-tabs { margin-bottom: 4px; }
.task-tab[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: #fff; }
a.task-tab { text-decoration: none; }
.att-days { display: flex; flex-wrap: wrap; gap: 6px; }
.att-more summary { list-style: none; cursor: pointer; color: var(--muted-2); }
.att-more summary::-webkit-details-marker { display: none; }
.att-more[open] { flex-basis: 100%; }
.att-more[open] summary { display: none; }
.att-day { flex: none; padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.att-day.is-active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.att-session { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.att-session-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 8px; }
.att-day.is-cancelled { color: var(--muted-2); text-decoration: line-through; }
.att-session-head .att-cancel { margin-left: auto; }
.att-session-head .att-move { margin-left: auto; }
.att-session-head .att-move + .att-cancel { margin-left: 0; }
.att-move > summary { list-style: none; cursor: pointer; }
.att-move > summary::-webkit-details-marker { display: none; }
.att-move-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 8px; }
.att-move-form label { display: grid; gap: 4px; }
.att-upcoming { padding: 20px; display: grid; gap: 8px; }
.att-upcoming .section-title, .att-upcoming p { margin: 0; }
.att-upcoming-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.att-upcoming-list li { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.att-upcoming-list li.is-cancelled strong { text-decoration: line-through; }
.att-upcoming-list strong::first-letter { text-transform: uppercase; }
.att-cancelled { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--surface-soft); color: var(--muted-2); font-weight: 600; }
.att-session-head h2::first-letter { text-transform: uppercase; }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.att-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto; align-items: center; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.att-row.is-busy { opacity: .55; }
.att-row.is-me { background: linear-gradient(90deg, var(--blue-soft), transparent 60%); margin-inline: -20px; padding-inline: 20px; }
.att-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; }
.att-note { flex-basis: 100%; font-weight: 500; font-size: 13px; color: var(--muted-2); }
.att-excuse { padding: 2px 8px; border-radius: 999px; background: #f7ebd3; color: #6b4a0e; font-size: 12px; font-weight: 700; }
.att-form { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.att-btn { height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.att-btn-present { background: #ddf1e5; border-color: #9fd1b3; color: #1e5a3a; }
.att-btn-late { background: #fbefcf; border-color: #ecc66f; color: #6b4a0e; }
.att-btn-absent { background: #fbe3e3; border-color: #eba39d; color: #7a1f1f; }
.att-btn-present[aria-pressed="true"] { background: #3f9a68; border-color: #3f9a68; color: #fff; }
.att-btn-late[aria-pressed="true"] { background: #e0a526; border-color: #e0a526; color: #3a2700; }
.att-btn-absent[aria-pressed="true"] { background: #d0453a; border-color: #d0453a; color: #fff; }
.att-btn-present:hover { border-color: #3f9a68; } .att-btn-late:hover { border-color: #e0a526; } .att-btn-absent:hover { border-color: #d0453a; }
.att-btn-approve { background: var(--blue); border-color: var(--blue); color: #fff; }
.att-btn-clear { width: 36px; padding: 0; display: inline-grid; place-items: center; color: var(--muted-2); }
.att-late-field { display: inline-flex; }
.att-late-field .att-btn { border-radius: 10px 0 0 10px; }
.att-late-field input { width: 64px; height: 36px; border-radius: 0 10px 10px 0; border-left: 0; padding: 0 8px; font-size: 14px; background: var(--surface); }
.att-note-input { flex: 1 1 200px; height: 36px; font-size: 14px; padding: 0 10px; border-radius: 10px; }
.att-pill { justify-self: end; display: inline-flex; flex-direction: column; align-items: flex-end; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.att-pill small { font-size: 11px; font-weight: 600; }
.att-none { color: var(--muted-2); }
.att-present { background: #ddf1e5; color: #1e5a3a; }
.att-pill.att-late { background: #fbefcf; color: #6b4a0e; }
.att-absent { background: #fbe3e3; color: #7a1f1f; }
.att-pill.is-pending { background: none; border: 2px dashed currentColor; border-radius: 12px; }
.att-name.is-blackened { padding: 1px 8px; border-radius: 8px; background: linear-gradient(135deg, #2c2c30, #47474d); color: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .08); }
.att-dots { color: #18181b; font-size: 11px; letter-spacing: 1px; }
.att-summary-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.att-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.att-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.att-key.att-present { background: #3f9a68; } .att-key.att-late { background: #e0a526; } .att-key.att-absent { background: #d0453a; }
.att-key.is-pending { border: 2px dashed var(--muted-2); }
.att-table-wrap { flex: none; overflow-x: auto; padding: 4px; }
.att-table { border-collapse: separate; border-spacing: 0; font-size: 14px; white-space: nowrap; }
.att-table th, .att-table td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.att-table thead th { font-size: 12px; color: var(--muted-2); font-weight: 700; vertical-align: bottom; }
.att-rate { font-weight: 800; }
.att-rate.is-good { color: #2c7a45; }
.att-rate.is-mid { color: #8a5d00; }
.att-rate.is-low { color: #a3291f; }
.att-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 700; }
.att-summary-name { display: inline-flex; align-items: center; gap: 6px; }
.att-summary-name form { display: inline; }
.att-col span { display: block; }
.att-col small { font-size: 10px; letter-spacing: .04em; }
.att-cell { min-width: 34px; font-size: 12px; font-weight: 800; }
td.att-present { background: #3f9a68; } td.att-late { background: #e0a526; color: #3a2700; } td.att-absent { background: #d0453a; }
td.att-cell { box-shadow: inset 0 0 0 3px var(--surface); border-radius: 8px; }
td.att-cell.is-pending { opacity: .45; }
td.att-cell.has-note { position: relative; padding: 0; }
td.att-cell.has-note::after { content: ''; position: absolute; top: 3px; right: 3px; border: 5px solid transparent; border-top-color: var(--ink); border-right-color: var(--ink); border-top-right-radius: 6px; pointer-events: none; }
.att-cell-btn { display: block; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; cursor: pointer; }
.att-cell-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.att-key-note { background: linear-gradient(225deg, var(--ink) 0 30%, var(--line) 30%); }
.att-pop { max-width: min(320px, calc(100vw - 32px)); padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgba(0, 0, 0, .18); white-space: normal; text-align: left; }
.att-pop[popover]:popover-open { display: flex; flex-direction: column; gap: 4px; }
.att-pop p { margin: 6px 0 0; font-weight: 600; }
.att-pop::backdrop { background: rgba(0, 0, 0, .12); }
@media (max-width: 720px) {
  .view-menu { position: relative; left: auto; bottom: auto; }
  .view-menu-list { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; z-index: 20; }
  .att-row.is-me { margin-inline: -20px; }
}

/* Topic trash under the board */
.board-status-wrap { display: inline-flex; align-items: baseline; gap: 8px; }
.topic-trash { border-top: 1px solid var(--line); padding-top: 10px; }
.topic-trash summary { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted-2); cursor: pointer; }
.topic-trash[open] summary { margin-bottom: 8px; }
.topic-trash-list { list-style: none; margin: 8px 0 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow-y: auto; overscroll-behavior: contain; }
.topic-trash-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.topic-trash-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topic-trash-text strong { overflow-wrap: anywhere; }
.topic-undo[hidden] { display: none; }

/* Notes history on a meeting page and the meeting trash */
.notes-history { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.notes-history > summary { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted-2); cursor: pointer; }
.notes-history-list { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.notes-history-list > li > details { padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.notes-history-list summary { cursor: pointer; }
.notes-history-list details[open] { display: flex; flex-direction: column; gap: 10px; }
.rte.notes-preview { min-height: 0; max-height: 360px; overflow: auto; font-size: 14px; }
.delete-meeting { display: flex; align-items: baseline; gap: 10px; }
.trash-notice { display: flex; align-items: baseline; gap: 8px; margin: 0; }

/* Topic card history inside the topic dialog */
.topic-history > summary { font-weight: 700; color: var(--muted-2); cursor: pointer; }
.topic-history-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; }
.topic-history-list li { display: flex; flex-direction: column; gap: 6px; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.topic-history-list li.is-shown { border-left-color: var(--blue); }
.topic-history-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.topic-history-count { min-width: 3.5em; font-weight: 700; }
.topic-history-count ins, .topic-diff ins { color: #1e5a3a; background: #ddf1e5; text-decoration: none; border-radius: 4px; padding: 0 2px; }
.topic-history-count del, .topic-diff del { color: #7a1f1f; background: #fbe3e3; border-radius: 4px; padding: 0 2px; }
/* "Ukázat změny": the dialog widens, the editor moves left and the diff opens beside it (below it on phones). */
.topic-dialog { transition: width .35s cubic-bezier(.2, .8, .2, 1); }
.topic-dialog.has-diff { width: min(1120px, calc(100vw - 32px)); }
/* align-content: WebKit otherwise stretches the row to the dialog's max-height and leaves empty space under the form. */
.topic-dialog.has-diff[open] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; align-content: start; }
/* The editor alone sets the dialog height: the diff contributes no height (height: 0), fills the editor's row and
   a long diff scrolls inside its body while the undo button stays in view. The editor keeps the closed dialog's
   width (560 − 2 × 22 padding) and only the diff column grows with the width transition, so the text never rewraps
   and the dialog doesn't bounce taller while it widens or narrows. */
@media (min-width: 981px) {
  .topic-dialog form { max-width: 516px; }
  .topic-dialog.has-diff[open] { grid-template-columns: 516px minmax(0, 1fr); column-gap: 0; overflow-x: clip; }
  .topic-dialog.has-diff[open] .topic-diff { height: 0; min-height: 100%; margin-left: 24px; }
  .topic-dialog.has-diff[open] .topic-diff-body { flex: 0 1 auto; max-height: none; }
}
.topic-diff { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-left: 24px; border-left: 1px solid var(--line); animation: diff-in .35s cubic-bezier(.2, .8, .2, 1); }
.topic-diff[hidden] { display: none; }
@keyframes diff-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.topic-diff-who { margin-right: auto; }
.topic-diff-legend { display: flex; gap: 8px; margin: 0; }
.topic-diff-title { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.topic-diff-body { min-height: 120px; max-height: 55vh; overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
@media (max-width: 980px) {
  .topic-dialog.has-diff[open] { grid-template-columns: minmax(0, 1fr); }
  .topic-diff { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--line); }
}

/* Theme picker in /app/nastaveni */
.theme-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.theme-option { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.theme-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.theme-swatch { display: flex; height: 44px; border-radius: 10px; overflow: hidden; }
.theme-swatch span { flex: 1; }

/* Profile (settings, member cards) and the overview's quote and birthdays */
.profile-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.member-profile { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.member-bio { flex-basis: 100%; font-style: italic; overflow-wrap: anywhere; }
.member-personality { color: inherit; text-decoration: none; }
.member-personality.has-file { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.member-personality.has-file:hover { text-decoration: none; }
.member-personality-file {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--blue-soft); color: var(--blue);
  font-size: 12px; font-weight: 800; transition: background .15s, color .15s;
}
.member-personality-file svg { width: 14px; height: 14px; }
.member-personality.has-file:hover .member-personality-file { background: var(--blue); color: #fff; }
.personality-file-current { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.personality-file-current .btn svg { width: 16px; height: 16px; margin-right: 6px; }
.personality-file-remove { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.file-viewer[open] { width: min(960px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 14px; }
.file-viewer-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-viewer-open svg { margin-left: 6px; }
.file-viewer-body:focus { outline: none; }
.file-viewer-body { display: grid; place-items: center; min-height: 0; overflow: auto; border-radius: 12px; background: var(--surface-soft); }
.file-viewer-body img { display: block; max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; }
.file-viewer-body iframe { display: block; width: 100%; height: calc(100dvh - 140px); border: 0; }
/* Quote of the day, handwritten: glyph paths from src/handwriting.ts, one group per line. In the animated version
   ([data-hand]) letters are hidden from the first paint and hand.client.js fades each one in as the pencil passes;
   if the script never starts they fade in by themselves after 2.5s. */
.hand-quote { position: relative; margin: 0; padding: 4px 30px 4px 0; align-self: center; color: var(--ink); }
.hand-svg { display: block; width: 100%; max-width: 440px; height: auto; overflow: visible; }
.hg { fill: currentColor; stroke: currentColor; stroke-width: .6; stroke-linejoin: round; }
.hg-accent { color: var(--blue); }
[data-hand] .hg { opacity: 0; transform: translateY(1.5px); transition: opacity .35s ease-out, transform .35s ease-out; }
[data-hand]:not(.is-writing):not(.is-done) .hg { animation: hand-fallback .5s 2.5s forwards; }
[data-hand] .hg.is-inked, [data-hand].is-done .hg { opacity: 1; transform: none; }
[data-hand]:not(.is-writing):not(.is-done) .hand-underline { opacity: 0; animation: hand-fallback .5s 2.5s forwards; }
@keyframes hand-fallback { to { opacity: 1; transform: none; } }
.hand-underline { fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; }
/* The tip sits at 19% / 84.5% of the pencil's box (TIP_X/TIP_Y in hand.client.js); the svg wobbles around it. */
.hand-pencil { position: absolute; top: 0; left: 0; width: 50px; height: 50px; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.hand-pencil svg { display: block; width: 100%; height: 100%; transform-origin: 19% 84.5%; filter: drop-shadow(3px 6px 4px rgba(18, 35, 61, .22)); }
.hand-quote.is-writing .hand-pencil { opacity: 1; }
.hand-quote.is-writing .hand-pencil svg { animation: write 1.4s ease-in-out infinite; }
@keyframes write { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-2.5deg) translateY(-1px); } }
.hand-quote.is-done .hand-pencil { opacity: 1; }
.hand-quote.is-done .hand-pencil svg { animation: lift 1.6s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
@keyframes lift { 0% { transform: none; opacity: 1; } 35% { transform: translate(6px, -10px) rotate(-8deg); opacity: 1; } 100% { transform: translate(34px, -46px) rotate(-26deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { [data-hand] .hg, [data-hand] .hand-underline { opacity: 1; transform: none; } .hand-pencil { display: none; } }
.birthday-card { position: relative; overflow: hidden; padding: 20px 22px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.birthday-card.is-today { background: radial-gradient(120% 90% at 0% 0%, var(--blue-soft), var(--surface) 70%); border-color: transparent; box-shadow: 0 18px 40px -26px var(--blue); }
.bday-eyebrow { position: relative; z-index: 1; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.bday-today { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.bday-avatars { display: flex; flex: none; }
.bday-avatars .bday-avatar + .bday-avatar { margin-left: -14px; }
.bday-avatar { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 24px; font-weight: 800; border: 3px solid var(--surface); }
.bday-hat { position: absolute; top: -26px; left: 50%; transform: translateX(-30%) rotate(14deg); animation: hat-bob 2.4s ease-in-out infinite; }
@keyframes hat-bob { 0%, 100% { transform: translateX(-30%) rotate(14deg); } 50% { transform: translateX(-30%) translateY(-3px) rotate(8deg); } }
.bday-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bday-who strong { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.bday-wish { font-size: 13px; color: var(--muted); }
.bday-confetti { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .45; }
.bday-confetti i { position: absolute; top: -10px; left: calc(6% + var(--i) * 8%); width: 7px; height: 12px; border-radius: 2px; opacity: .85;
  background: var(--blue); animation: confetti-fall calc(5s + var(--i) * .37s) linear calc(var(--i) * -.9s) infinite; }
.bday-confetti i:nth-child(3n + 1) { background: #e0a526; }
.bday-confetti i:nth-child(3n + 2) { background: #3f9a68; width: 6px; height: 6px; border-radius: 50%; }
.bday-confetti i:nth-child(4n) { background: #d0453a; }
@keyframes confetti-fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(260px) rotate(540deg); } }
.bday-soon { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.is-today .bday-soon { padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.bday-soon li { display: flex; align-items: center; gap: 12px; }
.bday-date { flex: none; width: 42px; height: 44px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 700; line-height: 1.1; }
.bday-date b { font-size: 17px; font-weight: 800; }
.bday-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bday-in { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--muted); font-size: 12px; font-weight: 700; }
@media (min-width: 721px) {
  .birthday-card.is-today { flex-direction: row; align-items: center; gap: 28px; padding: 24px 28px; }
  .birthday-card.is-today .bday-today { flex: 1 1 0; }
  .is-today .bday-soon { flex: 1 1 0; padding: 0 0 0 28px; border-top: 0; border-left: 1px dashed var(--line-strong); }
}
.profile-link { font-weight: 700; text-decoration: none; white-space: nowrap; }
.profile-link:hover { text-decoration: underline; }

/* Overview: the handwritten quote sits in the free space left of the tiles (outside .content, so the tiles keep
   their place); top 93px = content padding + walker height − its overlap + gap, 540px = the two bento rows.
   Where that space is too narrow it sits above the tiles instead. */
@media (min-width: 1480px) {
  .overview-quote { position: absolute; right: 100%; top: 93px; height: 540px; width: min(300px, calc((100vw - 1160px) / 2 - 24px)); display: flex; align-items: center; }
  .overview-quote .hand-quote { padding-right: 8px; }
}
@media (max-width: 1479px) { .hand-svg { max-width: 360px; } }

.google-head { display: flex; gap: 14px; align-items: flex-start; }
.google-icon { flex: none; }
.google-linked { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--blue-soft); color: var(--blue-dark); }
.google-linked > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.google-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #2e9d5b; box-shadow: 0 0 0 4px rgb(46 157 91 / .18); }
.google-synced { color: var(--blue-dark); opacity: .75; }
.google-subtitle, .field-group-title { margin: 0; font-size: 15px; }
.google-help { padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); line-height: 1.5; }
.google-help strong, .google-help em { color: var(--ink); font-style: normal; font-weight: 700; }
.google-help-contact { display: block; margin-top: 6px; color: var(--ink); font-weight: 600; }
.google-disconnect { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }

/* Omluvenky */
.abs-new { padding: 0; }
.abs-new-summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 20px 24px; cursor: pointer; }
.abs-new-summary::-webkit-details-marker { display: none; }
.abs-new-summary::before { content: '+'; font-size: 20px; font-weight: 700; color: var(--blue); }
.abs-new[open] .abs-new-summary::before { content: '–'; }
.abs-new > .alert { margin: 0 24px; }
.abs-form { padding-top: 0; }
.abs-when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.abs-times { display: none; flex-wrap: wrap; gap: 10px; }
.abs-form:has(#abs-part:checked) .abs-times { display: inline-flex; }
.abs-time { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.abs-time input { width: auto; min-width: 7.5em; }
.abs-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.abs-day { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.abs-day-title { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; }
.abs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.abs-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.abs-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.abs-row.is-me .abs-who strong { color: var(--blue-dark); }
.abs-actions { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.abs-past { display: flex; flex-direction: column; gap: 14px; }
.abs-past > summary { cursor: pointer; color: var(--muted-2); margin-bottom: 14px; }
.topic-conflict-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Polls (/app/ankety). Each option is a label with its result as a bar behind the text (--share), so voting and the
   results are one control; the real radio/checkbox stays in the label, visually hidden but focusable. */
.bento-polls { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 28px; animation-delay: .5s; }
a.bento-polls:hover { transform: scale(1.012); }
.bento-polls .bento-text { flex: 0 1 280px; }
.bento-poll-list { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.bento-poll-list li { display: flex; flex-direction: column; gap: 2px; max-width: 260px; padding: 10px 14px; border-radius: 14px; background: var(--tint); font-size: 14px; }
.bento-poll-list li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bento-poll-list li span { color: var(--muted); font-size: 13px; }
.bento-poll-list li.is-pending { background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }
.bento-poll-list li.is-pending span { color: var(--blue-dark); font-weight: 700; }
@media (max-width: 860px) {
  .bento-polls { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 16px; }
  .bento-polls .bento-text { flex: none; }
  .bento-poll-list { margin: 0; justify-content: flex-start; }
}

.poll-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.poll { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; transition: box-shadow .2s; }
.poll.is-pending { border-color: var(--blue-soft); box-shadow: 0 18px 36px -28px var(--accent-edge); }
.poll:target { box-shadow: 0 0 0 3px var(--focus); }
.poll-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.poll-heading { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.poll-question { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.poll-question a { color: inherit; text-decoration: none; }
.poll-question a:hover { color: var(--blue); }
.poll-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.poll-badge { flex: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.poll-badge.is-pending { background: var(--blue); color: #fff; }
.poll-badge.is-voted { background: #ddf1e5; color: #1e5a3a; }
.poll-badge.is-closed { background: var(--tint); color: var(--muted); }
.poll-badge svg { width: 12px; height: 12px; }
.poll-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.poll-tags li { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.poll-desc { margin: 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }

.poll-vote { display: flex; flex-direction: column; gap: 14px; }
.poll-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.poll-option {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; min-height: 52px;
  padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer;
  font-weight: 600; transition: border-color .15s;
}
.poll-option::before {
  content: ''; position: absolute; inset: 0 auto 0 0; z-index: -1; width: var(--share); background: var(--tint);
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.poll-option.is-top::before { background: var(--blue-soft); }
.poll-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.poll-option:has(input:checked) { border-color: var(--blue); }
.poll-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.poll-option:has(input:disabled) { cursor: default; }
@media (hover: hover) { .poll-option:not(:has(input:disabled)):hover { border-color: var(--line-strong); } }
.poll-check {
  width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: transparent; transition: background-color .15s, border-color .15s;
}
.poll-check.is-box { border-radius: 7px; }
.poll-check svg { width: 12px; height: 12px; }
.poll-option:has(input:checked) .poll-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.poll-option-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.poll-option-label { overflow-wrap: anywhere; }
.poll-option-voters { font-size: 12px; font-weight: 500; color: var(--muted); }
.poll-option-count { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.poll-option-count strong { font-size: 15px; }
.poll-option-count span { font-size: 12px; font-weight: 500; color: var(--muted); }
.poll-option.is-top .poll-option-count strong { color: var(--blue-dark); }

.poll-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.poll-turnout { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.poll-turnout-bar { position: relative; width: 72px; height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.poll-turnout-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--share); border-radius: 3px; background: var(--blue); }
.poll-turnout strong { color: var(--ink); }
.poll-buttons { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.poll-missing { margin: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.poll-missing-title { font-size: 13px; font-weight: 700; color: var(--muted); }
.poll-missing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.poll-missing-list li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--tint); font-size: 13px; font-weight: 600; }
.poll-missing-list li.is-me { background: var(--blue-soft); color: var(--blue-dark); }
.poll-all { flex-direction: row; align-items: center; gap: 6px; color: #1e5a3a; font-weight: 600; }

.poll-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 -8px -6px; }
.poll-admin .btn { height: 34px; }
.poll-admin svg { width: 14px; height: 14px; }
.poll-delete > summary { list-style: none; }
.poll-delete > summary::-webkit-details-marker { display: none; }
.poll-delete[open] > summary { display: none; }
.poll-delete-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-left: 8px; }
.poll-back { align-self: flex-start; padding: 0; }
.poll-past .poll-list { margin-top: 0; }

.poll-edit-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.poll-edit-option { display: flex; align-items: center; gap: 10px; }
.poll-edit-num { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.poll-add-option { align-self: flex-start; padding: 0; height: 32px; }
.poll-form-edit { align-items: flex-start; }
.poll-form-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .poll { padding: 18px; }
  .poll-head { flex-direction: column-reverse; }
}
.task-dialog input[type="date"]:invalid { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .15); }

/* Reflections reuse the poll card; these are the 1–10 scale and the results table. */
.refl-list { display: flex; flex-direction: column; gap: 16px; }
.refl.is-draft { border-style: dashed; }
.refl-target { max-width: 110px; }
.refl-draft-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.refl-publish { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.refl-rate { display: flex; flex-direction: column; gap: 10px; }
.refl-scale-hint { margin: 0 0 -4px auto; width: min(100%, 420px); display: flex; justify-content: space-between; }
.refl-rate-row { display: flex; align-items: center; gap: 10px 20px; padding: 10px 0; border-top: 1px solid var(--line); }
.refl-rate-label { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.refl-scale { flex: 0 0 min(100%, 420px); display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.refl-step { position: relative; cursor: pointer; }
.refl-step input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.refl-step span {
  display: grid; place-items: center; height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
  font-weight: 700; font-variant-numeric: tabular-nums; transition: background-color .15s, border-color .15s, color .15s;
}
.refl-step:has(input:checked) span { background: var(--blue); border-color: var(--blue); color: #fff; }
.refl-step:has(input:focus-visible) span { outline: 3px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) { .refl-step:hover span { border-color: var(--blue); } }
.refl-rate .poll-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.refl-locked { margin: 0; }
.refl-change > summary { list-style: none; margin-left: -8px; }
.refl-change > summary::-webkit-details-marker { display: none; }
.refl-change > summary svg { width: 14px; height: 14px; }
.refl-change[open] > summary { display: none; }

.refl-summary { display: flex; flex-wrap: wrap; gap: 10px; }
.refl-score { flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--tint); }
.refl-score strong { font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.refl-score span { font-size: 13px; color: var(--muted); }
.refl-score.is-ok { background: #ddf1e5; }
.refl-score.is-ok strong, .refl-score.is-ok span { color: #1e5a3a; }
.refl-table-wrap { margin: 0 -4px; }
.refl-table { min-width: 100%; }
.refl-table tbody th { white-space: normal; min-width: 130px; max-width: 240px; overflow-wrap: anywhere; }
.refl-table .refl-th-label { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; }
.refl-th-member { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
.refl-th-member.is-me { color: var(--blue-dark); }
.refl-avg { text-align: left; }
.refl-avg strong { display: inline-block; min-width: 30px; font-size: 15px; font-variant-numeric: tabular-nums; }
.refl-bar { position: relative; display: inline-block; vertical-align: middle; width: 64px; height: 6px; margin-right: 10px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.refl-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--share); border-radius: 3px; background: var(--blue); }
.refl-no { color: #7a1f1f; background: #fbe3e3; }
.att-table td.refl-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.refl-val.is-ok { background: #ecf7f0; color: #1e5a3a; }
.refl-val.is-miss { background: #fbf3e2; color: #6b4a0e; }
.refl-val.is-empty { color: var(--muted); font-weight: 500; }
.refl-val.is-me { box-shadow: inset 2px 0 0 var(--blue), inset -2px 0 0 var(--blue); }
@media (max-width: 640px) {
  .refl-rate-row { flex-direction: column; align-items: stretch; }
  .refl-scale { flex: none; gap: 3px; }
  .refl-step span { height: 36px; border-radius: 8px; font-size: 14px; }
  .refl-scale-hint { margin-left: 0; width: auto; }
  .refl-bar { display: none; }
}

.todo-card { padding: 20px 30px; border-radius: 24px; }
.todo-card > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; }
.todo-card[open] > summary { margin-bottom: 14px; }
.todo-card .todo-list { margin-top: 10px; }
.todo-add { display: flex; gap: 10px; align-items: center; }
.todo-add input { flex: 1; min-width: 0; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.todo-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todo-check {
  width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; color: transparent;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.todo-check:hover { border-color: #3f9a68; color: #3f9a68; }
.todo-item.is-done .todo-check { background: #3f9a68; border-color: #3f9a68; color: #fff; }
.todo-item.is-done .todo-text { color: var(--muted); text-decoration: line-through; }
.todo-delete { opacity: .55; }
.todo-delete:hover, .todo-delete:focus-visible { opacity: 1; }
.todo-done summary { cursor: pointer; padding: 6px 0; }
.todo-empty { padding: 6px 0; }
@media (max-width: 640px) { .todo-card { padding: 18px; } }

/* Feedback: bottom right on the overview, stacked above the waving penguin (.buddy). */
.feedback-fab {
  position: fixed; right: 36px; bottom: 170px; z-index: 10; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--blue); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(18, 35, 61, 0.55); transition: transform .2s ease, background .2s ease;
  animation: dock-in-left .7s .35s cubic-bezier(.2, .8, .2, 1) both;
}
.feedback-fab:hover, .feedback-fab:focus-visible { transform: translateY(-3px); background: var(--blue-dark); }
.feedback-pop {
  position: fixed; inset: auto 36px 224px auto; margin: 0; width: min(380px, calc(100vw - 32px)); padding: 20px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(18, 35, 61, .5);
}
.feedback-pop::backdrop { background: rgba(18, 35, 61, .2); }
.feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-head h2 { margin: 0; }
.feedback-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-kind input { position: absolute; opacity: 0; }
.feedback-kind span { display: inline-block; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; }
.feedback-kind input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.feedback-kind input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.feedback-anon { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.feedback-toast {
  position: fixed; right: 36px; bottom: 224px; z-index: 11; margin: 0; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 700; pointer-events: none; animation: feedback-toast 4s ease both;
}
@keyframes feedback-toast { 0%, 100% { opacity: 0; transform: translateY(8px); } 8%, 85% { opacity: 1; transform: none; } }
.feedback-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feedback-item { padding: 16px 18px; }
.feedback-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.feedback-meta form { margin-left: auto; }
.feedback-meta .pill { align-self: center; }
.feedback-text { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .feedback-fab { right: 14px; bottom: 196px; width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 16px; }
  .feedback-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .feedback-pop { inset: auto 16px 112px 16px; width: auto; }
  .feedback-toast { right: 14px; bottom: 252px; }
}
@media (prefers-reduced-motion: reduce) { .feedback-fab { animation: none; } }
