:root {
  --paper: #ece5d8; --paper-light: #f6f1e7; --cream: #f9efcd; --ink: #1c1a1e; --graphite: #444747;
  --blue: #8fc7d8; --blue-deep: #3e8da6; --line: #1c1a1e2e; --error: #a83b28;
  --display: "Bebas Neue", "Arial Narrow", sans-serif; --body: "Montserrat", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.55 var(--body); background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .26 0 0 0 0 .2 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1.05; margin: 0 0 .4em; }
h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 1.2em 0 .3em; }
p { margin: 0 0 .7em; }
a { color: inherit; }
ul { margin: 0; padding-left: 1.15em; }
li { margin-bottom: .3em; }
.page { margin: 0 auto; padding: 28px 16px 56px; }
.narrow { max-width: 560px; }
.wide { max-width: 1240px; }
.logo { display: block; width: 150px; margin: 0 auto 28px; }
.logo.small { width: 104px; margin: 0; }
.muted { color: var(--graphite); font-size: .9rem; }
.center { text-align: center; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); margin-bottom: .4em; }
.hello { margin-bottom: 24px; }
.topic { font-weight: 500; }
.note { border-left: 3px solid var(--blue); padding-left: 12px; }
.card, .panel { background: var(--paper-light); border: 1px solid var(--line); border-radius: 6px; padding: 20px; margin-bottom: 16px; }
.field { margin: 14px 0; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 5px; }
small { display: block; margin-top: 4px; }
input, select, textarea {
  width: 100%; min-height: 46px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #1c1a1e66; border-radius: 4px; padding: 10px 12px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; margin: 8px 0; }
.check input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--ink); }
button { font: inherit; color: inherit; cursor: pointer; }
.primary, .secondary {
  display: block; width: 100%; min-height: 48px; padding: 12px 18px; border-radius: 4px; border: 1.5px solid var(--ink); font-weight: 600; text-align: center; text-decoration: none; transition: background .15s, color .15s;
}
.primary { background: var(--ink); color: #fff; }
.primary:hover { background: var(--graphite); }
.primary:disabled { background: #1c1a1e66; border-color: transparent; cursor: not-allowed; }
.secondary { background: transparent; }
.secondary:hover { background: var(--blue); }
.primary.small, .secondary.small { display: inline-block; width: auto; min-height: 40px; padding: 7px 14px; font-size: .9rem; }
.glow { background: var(--blue); color: var(--ink); }
.link { background: none; border: 0; padding: 6px 2px; min-height: 36px; text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.danger { color: var(--error); }
.error { color: var(--error); font-weight: 500; }
.chip { font-size: .9rem; }
.days { display: grid; gap: 10px; margin-top: 12px; }
.day {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; background: var(--paper-light); border: 1px solid var(--line); border-radius: 6px; transition: border-color .15s, background .15s;
}
.day:hover { border-color: var(--ink); }
.day.on { background: var(--blue); border-color: var(--ink); }
.day-date { display: flex; align-items: center; gap: 12px; }
.day-num { font: 400 2.6rem/1 var(--display); }
.day-week { display: block; font-weight: 600; text-transform: capitalize; }
.day-month { display: block; font-size: .85rem; }
.day-time { text-align: right; }
.day-time strong { display: block; font: 400 1.7rem/1 var(--display); letter-spacing: .03em; }
.day-time small { font-size: .74rem; margin-top: 2px; }
.booking { margin: 0; }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.appointment { text-align: center; }
.big-date { font-weight: 600; margin: 0; }
.big-time { font: 400 3.6rem/1.1 var(--display); margin: 0; }
.guide ul { margin-bottom: .4em; }
.ink-stage { position: relative; height: 120px; margin-bottom: 10px; }
.ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: fade-out .5s ease-in 2.3s forwards; }
.ink-logo { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; opacity: 0; animation: fade-in .7s ease-out 2.4s forwards; }
.ink-line { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2s ease-in-out .2s forwards; }
.ink-dot { fill: var(--blue); stroke: var(--ink); stroke-width: 2; }
.ink-dot.end { opacity: 0; animation: fade-in .3s ease-out 2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ink { display: none; }
  .ink-logo { animation: none; opacity: 1; }
}
/* Panel */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font-weight: 600; font-size: .92rem; }
.tabs button.on { border-color: var(--ink); }
.board { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-head h1 { margin: 0; font-size: 2.3rem; min-width: 230px; text-align: center; }
.cal-head .small { margin-left: auto; }
.icon { width: 40px; height: 40px; background: none; border: 1px solid var(--line); border-radius: 4px; font-size: 1.3rem; line-height: 1; }
.hint { background: var(--cream); padding: 8px 12px; border-radius: 4px; font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.names span { font-size: .75rem; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: .05em; padding: 4px 0; }
.cell { min-height: 92px; padding: 7px; text-align: left; display: flex; flex-direction: column; gap: 4px; background: var(--paper-light); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.cell:hover { border-color: var(--ink); }
.cell .num { font-weight: 600; font-size: .9rem; }
.cell .tag { font-size: .74rem; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cell.other { opacity: .45; }
.cell.past { opacity: .55; }
.cell.today .num { background: var(--ink); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: .8rem; }
.cell.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
.cell.free { background: var(--blue); }
.cell.pending { background: var(--cream); border: 2px dashed var(--ink); }
.cell.confirmed { background: var(--ink); color: #fff; }
.cell.closed { background: transparent; border-style: dotted; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 12px 0 0; font-size: .82rem; }
.legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--ink); }
.legend .free { background: var(--blue); }
.legend .pending { background: var(--cream); border-style: dashed; }
.legend .confirmed { background: var(--ink); }
.legend .closed { border-style: dotted; }
.attention { border: 2px solid var(--ink); background: var(--cream); }
.person { font-weight: 600; margin: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.entry { padding: 12px 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; padding-top: 0; }
.entry-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.state { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--ink); white-space: nowrap; margin-bottom: 6px; }
.state.confirmed { background: var(--ink); color: #fff; }
.state.pending { background: var(--cream); border-style: dashed; }
.line { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; width: 100%; padding: 8px 0; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-size: .9rem; }
.line strong { font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.spaced { margin-top: 1.4em; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px; font-size: .9rem; z-index: 5; max-width: calc(100vw - 32px); }
@media (max-width: 900px) {
  .board, .split { grid-template-columns: minmax(0, 1fr); }
  .cal-head h1 { min-width: 0; flex: 1; font-size: 1.9rem; }
  .cal-head .small { width: 100%; margin-left: 0; }
  .cell { min-height: 62px; padding: 4px; }
  .cell .tag { font-size: .66rem; -webkit-line-clamp: 2; }
}
