@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #1A6B72;
  --accent-strong: #145459;
  --accent-tint: rgba(26, 107, 114, 0.09);
  --text: #1C1C1A;
  --muted: #6B6B65;
  --faint: #8C8C86;
  --placeholder: #A8A8A2;
  --card: #F7F7F6;
  --card-hover: #F1F1EF;
  --line: #EDEDEB;
  --danger: #B3452F;
  --danger-tint: rgba(196, 76, 56, 0.06);
  --white: #FFFFFF;
  --radius: 16px;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: var(--text); border: 0; outline: none; background: none; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .focus-ring:focus-within {
  outline: 2px solid rgba(26, 107, 114, 0.35);
  outline-offset: 2px;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* Fields ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; background: var(--card); border-radius: 14px; padding: 0 14px; height: 46px; font-size: 14px;
}
.select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B65' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.input-sm, .select-sm { height: 38px; border-radius: 12px; font-size: 13px; }
.textarea { height: auto; padding: 10px 14px; resize: vertical; min-height: 70px; line-height: 1.5; }
.unit-input { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 0 14px; height: 46px; }
.unit-input input { flex: 1; min-width: 0; height: 100%; }
.unit-input span { font-size: 13px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > * { flex: 1 1 200px; }

/* Buttons --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .15s ease, opacity .15s ease; }
.btn-primary { background: var(--accent); color: var(--white); font-weight: 600; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary[disabled] { opacity: .6; cursor: default; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: var(--card); }
.btn-soft { background: var(--card); color: var(--text); }
.btn-soft:hover { background: var(--card-hover); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 12px; font-size: 12.5px; }
.btn-danger { color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: var(--white); font-weight: 600; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--card); flex: none; }
.icon-btn:hover { background: var(--card-hover); }
.icon-btn-plain { background: transparent; }
.icon-btn-sm { width: 26px; height: 26px; }

/* Layout ---------------------------------------------------------------- */
.page { min-height: 100vh; padding: 56px 40px 160px; }
.wrap { max-width: 1240px; margin: 0 auto; }

.header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.brand-mark { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.brand-logo { display: block; height: 40px; max-width: 200px; object-fit: contain; }
.logo-wrap { position: relative; display: flex; align-items: center; }
.logo-wrap .logo-remove { position: absolute; top: -8px; right: -8px; opacity: 0; transition: opacity .15s; }
.logo-wrap:hover .logo-remove, .logo-wrap:focus-within .logo-remove { opacity: 1; }
.file-label { position: relative; cursor: pointer; display: inline-flex; align-items: center; }
.pill-upload { gap: 6px; height: 28px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--card); font-size: 12px; font-weight: 500; color: var(--muted); }
.page-title { font-size: 40px; line-height: 1.1; letter-spacing: -0.035em; margin-top: 14px; }
.page-date { font-size: 14px; color: var(--muted); margin-top: 6px; }

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; padding: 0 18px; height: 40px; width: 280px; max-width: 100%; color: var(--faint); }
.search input { width: 100%; height: 100%; font-size: 14px; }
.tool-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card); color: var(--muted); font-size: 13.5px; font-weight: 500; }
.tool-btn.is-active { background: var(--accent-tint); color: var(--accent); }
.tool-btn-plain { background: transparent; }
.tool-btn-plain:hover { background: var(--card); }
.seg { display: flex; gap: 2px; background: var(--card); padding: 4px; border-radius: 999px; }
.seg button { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 12px; border-radius: 999px; color: var(--faint); font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.seg-wide { width: 100%; }
.seg-wide button { flex: 1; height: 34px; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; align-items: center; justify-content: flex-end; }
.filters .select { width: auto; height: 36px; border-radius: 999px; font-size: 13px; }

.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; }
.chip-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 500; transition: opacity .15s; }
.chip-btn[aria-pressed="false"].is-dim { opacity: .55; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Links ------------------------------------------------------------------ */
.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.link-tile { position: relative; background: var(--card); border-radius: 18px; width: 116px; height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--accent); transition: background-color .15s; }
.link-tile:hover { background: var(--card-hover); color: var(--accent); }
.link-tile span { font-size: 12.5px; font-weight: 500; color: var(--text); text-align: center; padding: 0 8px; line-height: 1.25; }
.link-wrap { position: relative; }
.link-wrap .link-edit { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--faint); opacity: 0; transition: opacity .15s; }
.link-wrap:hover .link-edit, .link-wrap:focus-within .link-edit { opacity: 1; }
.link-add { background: var(--white); color: var(--muted); }
.link-add span { color: var(--muted); }
.link-form { background: var(--card); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; width: 320px; }
.link-form .input { background: var(--white); height: 38px; border-radius: 12px; font-size: 13.5px; }
.icon-pick { display: flex; gap: 6px; justify-content: space-between; }
.icon-pick button { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--white); color: var(--muted); }
.icon-pick button[aria-pressed="true"] { background: var(--accent); color: var(--white); }

/* Board ------------------------------------------------------------------ */
.board { margin-top: 64px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px; }
.cols-kanban { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 24px; }
.col-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.col-head h2 { font-size: 15px; }
.col-head .count { font-size: 13px; color: var(--muted); }
.col-head .load { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.col-head .load.is-over { color: var(--danger); font-weight: 600; }
.h-overdue { color: var(--danger); }
.h-important { color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.empty { font-size: 13px; color: var(--muted); padding: 18px 4px; }

.card { display: flex; align-items: flex-start; gap: 4px; background: var(--card); border-radius: var(--radius); transition: background-color .15s; }
.card:hover { background: var(--card-hover); }
.card .check { margin: 18px 0 0 16px; }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 18px 20px 18px 10px; border-radius: var(--radius); }
.card-title { font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.card-meta-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta > span:not(.card-meta-text) { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.card .chips { margin-top: 12px; }
.card.is-done .card-title { color: var(--muted); text-decoration: line-through; }

.check { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #E8E8E5; color: transparent; transition: background-color .15s, color .15s; }
.check:hover { color: var(--faint); }
.check[aria-pressed="true"] { background: var(--accent); color: var(--white); }

/* Calendar --------------------------------------------------------------- */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.cal-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.cal-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.cal-title .kw { font-size: 13px; color: var(--muted); }
.cal-title .wl { font-size: 13px; color: var(--muted); }
.cal-title .wl.is-over { color: var(--danger); font-weight: 500; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-scroll { overflow-x: auto; margin: 0 -8px; padding: 0 8px 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; min-width: 760px; }
.cal-day { min-height: 440px; border-radius: 18px; padding: 10px; }
.cal-day.is-today { background: rgba(26, 107, 114, 0.045); }
.cal-day.is-over { background: var(--danger-tint); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px; }
.cal-day-head .wd { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-right: 8px; }
.cal-day-head .dn { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.cal-day.is-today .dn { background: var(--accent); color: var(--white); }
.cal-add { opacity: 0; transition: opacity .15s; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.bar { height: 3px; background: #EFEFED; border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: var(--accent); }
.is-over .bar > div { background: var(--danger); }
.cal-load { margin-top: 6px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.is-over .cal-load { color: var(--danger); font-weight: 600; }
.cal-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.card-cal { display: block; width: 100%; text-align: left; background: var(--card); border-radius: 12px; padding: 10px 12px; transition: background-color .15s; }
.card-cal:hover { background: var(--card-hover); }
.card-cal.is-projected { opacity: .55; }
.card-cal-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 500; line-height: 1.35; }
.card-cal.is-done .card-cal-title { color: var(--muted); text-decoration: line-through; }
.card-cal-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.card-cal-meta .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

/* FAB -------------------------------------------------------------------- */
.fab { position: fixed; bottom: 36px; right: 36px; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(20, 60, 64, 0.22); z-index: 40; transition: transform .15s ease; }
.fab:hover { transform: scale(1.05); }

/* Overlays --------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay.anim { animation: fade .15s ease; }
.overlay-side { display: block; padding: 0; background: rgba(255, 255, 255, 0.6); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { background: var(--white); border-radius: 28px; padding: 36px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12); }
.sheet h2 { font-size: 24px; letter-spacing: -0.025em; margin-bottom: 28px; }
.sheet-body { display: flex; flex-direction: column; gap: 18px; }
.sheet-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.side { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 470px; max-width: calc(100vw - 24px); background: var(--white); border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12); padding: 28px 32px 28px; overflow-y: auto; }
.side-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.side h2 { font-size: 24px; letter-spacing: -0.025em; }
.title-input { width: 100%; font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; margin: 22px 0 22px; padding: 0; resize: none; overflow: hidden; }
.meta { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.meta-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 34px; }
.meta-row > span:first-child { color: var(--muted); }
.meta-row .select, .meta-row .input { width: auto; max-width: 230px; height: 34px; border-radius: 10px; font-size: 13.5px; font-weight: 500; }
.meta-row .unit-input { height: 34px; border-radius: 10px; padding: 0 10px; }
.meta-row .unit-input input { width: 52px; text-align: right; font-weight: 500; }
.meta-hint { font-size: 12.5px; color: var(--muted); text-align: right; }
.section { margin-top: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-head h3 { font-size: 13px; }
.section-head .muted { font-size: 12.5px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 500; color: var(--muted); }
.toggle[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); }

.subrow { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 2px; border-radius: 12px; }
.subrow:hover { background: #FAFAF9; }
.subrow .sub-title { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.subrow.is-done .sub-title { color: var(--muted); text-decoration: line-through; }
.hover-x { opacity: 0; transition: opacity .15s; }
.subrow:hover .hover-x, .subrow:focus-within .hover-x, .listrow:hover .hover-x, .listrow:focus-within .hover-x { opacity: 1; }
.add-row { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 2px; color: var(--faint); }
.add-row input { flex: 1; min-width: 0; height: 28px; font-size: 13.5px; }
.progress { height: 3px; background: #F2F2F1; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.progress > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 22px 16px; border-radius: 16px; background: var(--card); cursor: pointer; text-align: center; transition: background-color .15s; }
.dropzone.is-active { background: var(--accent-tint); }
.dropzone .dz-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 6px; }
.dropzone strong { font-size: 13.5px; font-weight: 500; }
.dropzone small { font-size: 12.5px; color: var(--muted); }
.filerow { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 10px 10px 10px 14px; color: var(--faint); }
.filerow .fname { font-size: 13px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filerow .fsize { font-size: 12px; color: var(--muted); flex: none; }
.filerow button.fname { text-align: left; }
.filerow button.fname:hover { color: var(--accent); }

.comment .c-head { display: flex; gap: 8px; align-items: baseline; }
.comment .c-author { font-size: 13px; font-weight: 600; }
.comment .c-time { font-size: 12px; color: var(--muted); }
.comment .c-body { font-size: 13.5px; line-height: 1.5; color: #3A3A36; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.composer { display: flex; align-items: flex-end; gap: 8px; background: var(--card); border-radius: 18px; padding: 8px 8px 8px 16px; margin-top: 18px; }
.composer textarea { flex: 1; resize: none; font-size: 13.5px; line-height: 1.5; padding: 6px 0; min-height: 44px; }
.send { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--accent); color: var(--white); display: flex; align-items: center; justify-content: center; }

.listrow { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; background: var(--card); border-radius: 14px; }
.listrow .lr-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; }
.lr-unit { display: flex; align-items: center; gap: 6px; background: var(--white); border-radius: 10px; padding: 0 10px; height: 34px; }
.lr-unit input { width: 46px; text-align: right; font-size: 13.5px; }
.lr-unit span { font-size: 12.5px; color: var(--muted); }
.type-card { background: var(--card); border-radius: 14px; }
.type-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.type-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; border-radius: 10px; color: var(--faint); }
.type-toggle .tt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.type-toggle .tt-name { font-size: 14px; font-weight: 500; color: var(--text); }
.type-toggle .tt-sub { font-size: 12px; color: var(--muted); }
.type-toggle svg { transition: transform .15s; }
.type-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.type-body { padding: 0 14px 12px 38px; display: flex; flex-direction: column; }
.type-body .cl-head { font-size: 12px; font-weight: 500; color: var(--muted); padding: 4px 0 6px; }
.cl-item { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.cl-item .cl-dot { width: 16px; height: 16px; flex: none; border-radius: 50%; background: #E6E6E3; }
.cl-item .cl-title { flex: 1; min-width: 0; font-size: 13.5px; }
.cl-item:hover .hover-x, .cl-item:focus-within .hover-x { opacity: 1; }
.p-hint { margin: 24px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.sum-row { display: flex; justify-content: space-between; padding: 16px 16px 0; font-size: 13.5px; }
.inline-add { display: flex; gap: 8px; margin-top: 20px; }
.inline-add .input { height: 44px; }
.mini-add { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-add .input { flex: 1 1 100%; height: 38px; border-radius: 12px; font-size: 13px; }
.mini-add .input.half { flex: 1 1 0; }
.hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.error { font-size: 13px; color: var(--danger); }
.more-toggle { display: none; align-items: center; justify-content: space-between; height: 44px; padding: 0 2px; font-size: 14px; font-weight: 500; }
.more-toggle svg { transition: transform .15s; }
.more-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-fields { display: flex; flex-direction: column; gap: 18px; }
.quick-due { display: none; flex-direction: column; gap: 8px; }
.quick-due .qd-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.quick-due .qd-row::-webkit-scrollbar { display: none; }
.qd { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--card); }
.qd[aria-pressed="true"] { background: var(--accent); color: var(--white); }
.handle { display: none; justify-content: center; padding: 0 0 14px; }
.handle span { width: 36px; height: 4px; border-radius: 999px; background: #E2E2DF; }

/* Toast ------------------------------------------------------------------ */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--text); color: var(--white); padding: 12px 18px; border-radius: 14px; font-size: 13.5px; z-index: 70; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); max-width: calc(100vw - 32px); animation: fade .15s ease; }
.toast.is-error { background: var(--danger); }

/* Login ------------------------------------------------------------------ */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-box h1 { font-size: 32px; letter-spacing: -0.035em; margin: 18px 0 8px; }
.login-box p { color: var(--muted); margin: 0 0 28px; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box .btn { width: 100%; height: 48px; }
.center-msg { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #E6E6E3; border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Touch: Bedienelemente ohne Hover sichtbar ----------------------------------- */
@media (hover: none) {
  .hover-x, .cal-add, .logo-wrap .logo-remove, .link-wrap .link-edit { opacity: 1; }
}

/* Mobil -------------------------------------------------------------------- */
@media (max-width: 640px) {
  .page { padding: 20px 16px 132px; }
  .page-title { font-size: 32px; }
  .tools { width: 100%; }
  .search { flex: 1 1 100%; width: auto; height: 44px; }
  .hide-mobile { display: none; }
  .links { flex-wrap: nowrap; overflow-x: auto; margin: 28px -16px 0; padding: 0 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .links::-webkit-scrollbar { display: none; }
  .link-tile { flex: none; width: 88px; height: 84px; scroll-snap-align: start; }
  .link-wrap { flex: none; }
  .link-form { flex: none; width: calc(100vw - 32px); }
  .board { margin-top: 36px; }
  .cols { gap: 36px; }
  .cal-scroll { overflow: visible; margin: 0; padding: 0; }
  .cal-grid { min-width: 0; grid-template-columns: 1fr; gap: 4px; }
  .cal-day { min-height: 0; }
  .fab { width: 64px; height: 64px; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); }
  .overlay { align-items: flex-end; padding: 0; }
  .sheet { max-width: none; border-radius: 24px 24px 0 0; padding: 10px 20px 0; max-height: 94vh; }
  .sheet h2 { margin-bottom: 20px; }
  .sheet-footer { position: sticky; bottom: 0; background: var(--white); margin: 0 -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
  .sheet-footer .btn-primary { flex: 1; height: 52px; font-size: 16px; }
  .side { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: 94vh; border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .handle, .quick-due, .more-toggle { display: flex; }
  .more-fields { display: none; }
  .more-fields.is-open { display: flex; }
  input, select, textarea { font-size: 16px !important; }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
