:root {
  color-scheme: light;
  --ink: #182f41;
  --blue: #246586;
  --muted: #506371;
  --line: #d9e2e9;
  --pale: #eaf3f8;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f6f8fa;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body, h1, h2, h3, p { margin: 0 }
body { -webkit-font-smoothing: antialiased }
a { color: var(--blue) }
button, input, select { font: inherit }
button, .button { cursor: pointer; touch-action: manipulation }
:focus-visible { outline: 3px solid #377fa6; outline-offset: 3px }
header { background: white; border-bottom: 1px solid var(--line) }
.wrap { width: min(1032px, calc(100% - 56px)); margin: auto }
.topbar, .section-heading, .group, footer, .form-actions { display: flex; align-items: center }
.topbar, .section-heading, footer { justify-content: space-between }
.topbar { min-height: 77px }
.logo { display: block; width: 136px; height: auto }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 9px 16px; border: 1px solid transparent;
  border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.secondary { color: var(--ink); background: #fff; border-color: #c7d3db }
.secondary:hover { background: #eff5f8 }
.primary { background: var(--blue); color: #fff }
.primary:hover { background: #1d516c }
.quiet { background: transparent; color: var(--blue) }
button:disabled { opacity: .6; cursor: wait }
.hero {
  margin-top: 26px; min-height: 245px; display: flex; align-items: center; overflow: hidden; border-radius: 14px;
  color: white; background: linear-gradient(90deg, #17374e 12%, #193e55ee 38%, #17374e24 83%), url("architecture.webp") center 53% / cover;
}
.hero-text { padding: 30px 44px }
.rule { display: block; width: 36px; height: 4px; margin-bottom: 14px; background: #8dc9e6 }
h1 { font-size: clamp(44px, 5.4vw, 64px); line-height: .99; letter-spacing: -.055em; font-weight: 650 }
.hero p { margin-top: 20px; font-size: 16px; font-weight: 500 }
.section-heading { gap: 12px; flex-wrap: wrap; margin: 28px 0 14px }
.group { gap: 12px }
h2 { font-size: 25px; line-height: 1.2; letter-spacing: -.035em }
#total { font-size: 12px; color: var(--muted); padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px }
.zone { font-size: 13px; color: var(--muted) }
#add { margin-bottom: 12px }
#days { background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.day { padding: 14px 23px; display: grid; grid-template-columns: 54px minmax(155px, 23%) minmax(0,1fr); align-items: center; gap: 16px; min-height: 81px }
.day + .day { border-top: 1px solid var(--line) }
.stamp { width: 50px; height: 53px; display: grid; align-content: center; justify-items: center; background: var(--pale); color: #1f5572; border: 1px solid #d2e3ed; border-radius: 8px }
.stamp span { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase }
.stamp b { font-size: 23px; line-height: 1.07; font-variant-numeric: tabular-nums }
.day.empty .stamp { background: #f3f5f6; color: #61727b; border-color: var(--line) }
h3 { font-size: 16px }
h3 small { display: block; margin-top: 3px; font-weight: 400; font-size: 12px; color: var(--muted) }
.meeting { min-height: 33px; display: flex; align-items: center; gap: 12px }
.meeting + .meeting { margin-top: 7px }
.meeting time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #1b5675; background: #e2eff6; padding: 5px 8px; border-radius: 5px }
.meeting strong { font-size: 16px; overflow-wrap: anywhere }
.edit { margin-left: auto; padding: 5px 7px; font-size: 12px }
.none, .waiting { color: var(--muted); font-size: 14px }
.waiting { padding: 20px }
footer { padding: 20px 0 32px; color: var(--muted); font-size: 12px }
footer a { padding: 8px 0 }
dialog { color: var(--ink); width: min(430px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 60px #182f4130; max-height: 90dvh }
dialog::backdrop { background: #162a3da6 }
dialog p { font-size: 14px; line-height: 1.5; margin: 10px 0; color: var(--muted) }
#sharing .button { margin: 8px 2px 0 0 }
#sharing form { margin-top: 6px; text-align: right }
label { display: grid; gap: 6px; margin: 15px 0 0; font-size: 13px; font-weight: 600 }
input, select { width: 100%; min-width: 0; border: 1px solid #a9bcc9; border-radius: 6px; padding: 9px; font-size: 16px; color: var(--ink); background: #fff }
.form-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px }
.form-actions { justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 22px }
.delete { color: #a12d31; margin-right: auto }
.danger { background: #992b31; color: #fff }
#form-error { color: #a12d31 }
#notice:not(:empty) { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: white; padding: 12px 17px; border-radius: 8px; width: max-content; max-width: calc(100% - 24px); font-size: 14px }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 28px) }
  .topbar { min-height: 64px }
  .logo { width: 115px }
  .hero { margin-top: 15px; min-height: 201px; background-position: center, 60% center }
  .hero-text { padding: 23px }
  .hero p { font-size: 14px }
  .section-heading { gap: 6px; margin: 21px 0 11px }
  h2 { font-size: 22px }
  .group { gap: 7px }
  .zone, #total { font-size: 11px }
  .day { grid-template-columns: 42px minmax(0, 1fr); gap: 3px 12px; padding: 13px; min-height: 80px }
  .stamp { grid-row: span 2; width: 42px; height: 48px }
  h3 small { display: none }
  .events { grid-column: 2 }
  .meeting { gap: 7px; min-height: 25px }
  .meeting time { font-size: 12px }
  .meeting strong { font-size: 15px }
  .none { font-size: 12px }
  .edit { min-height: 35px }
  .form-grid { grid-template-columns: 1fr }
  dialog { padding: 18px }
}
