
:root {
  --bg: #11151b;
  --panel: #1a2028;
  --panel2: #202833;
  --text: #eef4fa;
  --muted: #9eabb9;
  --accent: #59b8ff;
  --accent2: #7ee0ad;
  --border: #35404d;
  --danger: #ff7d7d;
  --input: #0e1217;
  --my-clock: #bfe9ff;
  --grid: rgba(255,255,255,.13);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin:0; background:var(--bg); color:var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-header {
  position:sticky; top:0; z-index:20; display:flex; justify-content:space-between; align-items:center;
  gap:24px; padding:18px clamp(16px,3vw,44px); background:color-mix(in srgb,var(--bg) 94%,transparent);
  backdrop-filter:blur(12px); border-bottom:1px solid var(--border);
}
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:3px; font-size:clamp(1.55rem,3vw,2.2rem); }
h2 { margin-bottom:6px; }
.subtitle,.section-heading p,section > p { color:var(--muted); margin-bottom:0; }
main { max-width:1500px; margin:auto; padding:24px clamp(12px,3vw,44px) 60px; }
.panel { background:var(--panel); border:1px solid var(--border); border-radius:18px; padding:20px; margin-bottom:22px; box-shadow:0 10px 30px rgba(0,0,0,.12); }
.section-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:18px; }
button, select, input {
  border:1px solid var(--border); border-radius:9px; background:var(--input); color:var(--text);
  font:inherit; 
}
button { cursor:pointer; background:var(--accent); color:#06111a; border:0; font-weight:700; }
button.secondary { background:var(--panel2); color:var(--text); border:1px solid var(--border); }
button.danger { background:transparent; color:var(--danger); border:1px solid var(--danger); }
label { display:flex; flex-direction:column; gap:5px; color:var(--muted); font-size:.88rem; }
.clock-grid { display:grid; grid-template-columns:1.15fr repeat(3,1fr); gap:16px; }
.clock-card {
  background:var(--panel2); border:1px solid var(--border); border-radius:16px; padding:14px;
  min-width:0;
}
.clock-card.my-clock { border-color:var(--accent); }
.clock-title-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.clock-title { font-size:1.05rem; font-weight:800; }
.clock-canvas-wrap { width:min(100%,310px); aspect-ratio:1; margin:0 auto 12px; position:relative; }
.clock-canvas { width:100%; height:100%; display:block; touch-action:none; cursor:grab; }
.clock-canvas:active { cursor:grabbing; }
.clock-controls { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; }
.clock-controls select { min-width:0; width:100%; }
.digital-time { width:100%; }
.tz-offset { color:var(--muted); font-size:.8rem; margin-top:6px; text-align:center; }
.wake-chart { overflow:visible; position:relative; width:100%; max-width:100%; }
.wake-row { display:grid; grid-template-columns:minmax(110px,22%) minmax(0,1fr) minmax(70px,15%); min-width:0; width:100%; height:26px; border-top:1px solid var(--border); }
.person-cell { padding:0; display:flex; gap:7px; align-items:center; }
.wake-row:first-child { height:26px; }
.wake-row:first-child .person-cell { min-height:26px; }
.wake-row:not(:first-child) .person-cell { min-height:26px; }
.wake-row:not(:first-child) .person-cell input,
.wake-row:not(:first-child) .row-actions button,
.wake-row:not(:first-child) .row-tz select { height:26px; padding-top:2px; padding-bottom:2px; }
.person-cell input { min-width:0; flex:1; }
.row-actions { display:flex; gap:4px; }
.timeline {
  position:relative; height:26px; margin-left:8px; margin-right:8px; border-left:1px solid var(--border); border-right:1px solid var(--border);
  background-image:repeating-linear-gradient(to right, transparent 0, transparent calc(4.1666667% - 1px), var(--grid) 4.1666667%);
}
.wake-row:first-child .timeline { height:26px; }
.hour-labels { height:0; position:absolute; left:0; right:0; top:0; pointer-events:none; overflow:visible; }
.hour-label { position:absolute; top:-18px; transform:translateX(-50%); font-size:.67rem; font-weight:700; }
.hour-label.day { color:#fff; }
.hour-label.night { color:#999; }
.hour-label:first-child { transform:none; }
.wake-bar {
  position:absolute; top:0; height:26px; border-radius:0; background:var(--accent2);
  cursor:ew-resize; min-width:6px; box-shadow:0 2px 7px rgba(0,0,0,.25);
}
.wake-bar::before,.wake-bar::after { content:""; position:absolute; top:0; bottom:0; width:8px; cursor:ew-resize; }
.wake-bar::before { left:0; } .wake-bar::after { right:0; }
.wake-row:first-child .wake-bar { top:0; }
.wake-label { position:absolute; inset:0; display:grid; place-items:center; color:#06130c; font-size:.78rem; font-weight:800; pointer-events:none; }
.current-time-line { position:absolute; top:0; bottom:0; width:5px; margin-left:-2px; background:#ff3b30; z-index:20; pointer-events:none; }
.row-tz { padding:0; min-width:0; color:var(--muted); font-size:.82rem; display:flex; align-items:center; overflow:hidden; }
.row-tz select { min-width:0; width:100%; max-width:100%; }
.date-inputs { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:16px 0; }
.date-inputs input { width:100%; }
.result-big { padding:17px; border-radius:12px; background:var(--panel2); color:var(--accent); font-size:clamp(1.15rem,2vw,1.55rem); font-weight:800; text-align:center; margin-bottom:12px; }
.result-grid,.parse-results { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.result-grid > div,.parse-results > div { background:var(--panel2); border-radius:11px; padding:12px; }
.result-grid span,.parse-results span { display:block; color:var(--muted); font-size:.78rem; margin-bottom:5px; }
.result-grid strong,.parse-results strong { word-break:break-word; font-size:1.05rem; }
.parse-row { display:flex; gap:10px; margin:16px 0; }
.parse-row input { flex:1; min-width:0; }
footer { text-align:center; padding:20px; color:var(--muted); font-size:.8rem; }
@media (max-width:900px) {
  .clock-grid { grid-template-columns:1fr 1fr; }
  .clock-card.my-clock { grid-column:1 / -1; }
  .result-grid,.parse-results { grid-template-columns:1fr 1fr; }
}
@media (max-width:600px) {
  .site-header,.section-heading { flex-direction:column; }
  .clock-grid { grid-template-columns:1fr; }
  .clock-card.my-clock { grid-column:auto; }
  .date-inputs,.result-grid,.parse-results { grid-template-columns:1fr; }
}

/* 0.0.3 refinements */
.date-field {
  display:grid;
  grid-template-columns: minmax(0,1fr) minmax(130px,.65fr) auto;
  gap:10px;
  align-items:end;
  background:var(--panel2);
  padding:12px;
  border-radius:11px;
}
.date-field input[type="date"],
.date-field input[type="time"] {
  width:100%;
  min-width:0;
  cursor:pointer;
}
.copy-button {
  width:38px;
  min-width:38px;
  height:38px;
  padding:0;
  display:inline-grid;
  place-items:center;
  font-size:1rem;
}
.result-big {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.result-grid > div,.parse-results > div {
  position:relative;
  padding-right:48px;
}
.result-grid > div .copy-button,.parse-results > div .copy-button {
  position:absolute;
  right:8px;
  bottom:8px;
}
.tz-offset {
  font-size:1rem;
  font-weight:800;
}
.parse-row .copy-button { flex:0 0 38px; }
@media (max-width:700px) {
  .date-field { grid-template-columns:1fr; }
  .date-field .copy-button { width:100%; }
}

/* 0.0.4 smart date/time controls */
.date-entry { min-width:0; }
.date-entry > label { width:100%; }
.date-entry-controls { display:grid; grid-template-columns:minmax(0,1fr) 42px 42px; gap:8px; }
.date-entry-controls input[type="text"] { width:100%; min-width:0; }
.native-date-picker {
  position:absolute !important;
  width:1px !important; height:1px !important;
  opacity:0 !important; pointer-events:none !important;
}
.calendar-button,.date-entry-controls .copy-button { width:42px; min-width:42px; height:42px; padding:0; }
@media (max-width:600px) {
  .date-entry-controls { grid-template-columns:minmax(0,1fr) 42px 42px; }
}

.tz-offset { font-size:1rem; font-weight:800; }

.wake-bar { overflow:hidden; }
.wake-label { white-space:nowrap; padding:0 5px; }

.timeline { touch-action:none; }
