:root {
  color-scheme: light;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", "MS PMincho", serif;
  color: #292331;
  background: #fbf8fd;
  --edge: #cfbce6;
  --lavender: #715692;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 12% 12%, #e9d9f466, transparent 50%),
    radial-gradient(ellipse at 78% 32%, #fff 0%, transparent 63%),
    radial-gradient(ellipse at 25% 75%, #f3e4f45c, transparent 51%),
    radial-gradient(ellipse at 89% 92%, #e5d7f16b, transparent 60%), #fbf8fd;
  background-attachment: fixed;
  font-size: 17px;
}
.notebook { width: min(100%, 520px); margin: 0 auto; padding: 19px 19px 94px; }
header { text-align: center; height: 69px; position: relative; }
header img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 306px); }
h1, h2, h3, strong { margin: 0; font-weight: 400; }
h1 { font-size: 31px; letter-spacing: .12em; }
h2 { text-align: center; font-size: 24px; letter-spacing: .07em; margin: 10px 0 8px; }
h3 { text-align: center; font-size: 21px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 2px solid #6e4b99; outline-offset: 2px; }
input, textarea, .primary, .secondary, .date-pill {
  border: 1px solid var(--edge);
  background: #ffffffad;
}
input, textarea { min-width: 0; padding: 5px 11px; border-radius: 12px; font-size: 18px; }
.primary, .secondary {
  display: block;
  min-height: 44px;
  padding: 4px 20px;
  border-radius: 30px;
  margin: 12px auto 0;
  background: radial-gradient(ellipse at 40% 90%, #ebdff7, #ffffffcf 70%);
}
.primary { min-width: 57%; font-size: 20px; letter-spacing: .05em; }
#entry { max-width: 365px; margin: 16px auto; padding: 15px 20px 24px; border: 1px solid var(--edge); border-radius: 22px; background: #ffffff55; }
#join label { display: block; margin: 18px 0 5px; }
#room-code { width: 100%; }
.switcher { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 21px; }
.switcher button { border: 0; background: transparent; min-width: 44px; height: 44px; font-size: 32px; line-height: 1; }
.date-pill { text-align: center; padding: 3px 15px; min-width: 47%; border-radius: 24px; }
.measure { display: grid; grid-template-columns: 1fr minmax(70px, 42%) 34px; gap: 8px; align-items: center; margin: 5px 0; padding: 3px 12px; border: 1px solid var(--edge); border-radius: 13px; background: #ffffff66; }
.measure input { border-radius: 26px; text-align: center; }
.memo { display: block; margin-top: 8px; }
.memo textarea { display: block; width: 100%; margin-top: 3px; resize: vertical; }
.divider { margin: 6px 0 0; display: flex; align-items: center; gap: 5px; color: #9d75c4; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #bb95e1, transparent); }
.calendar { border: 1px solid var(--edge); border-radius: 15px; overflow: hidden; background: #ffffff80; }
.week, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.week { padding: 3px 2px; background: #eee4faab; }
.days { padding: 2px 2px 6px; }
.day { display: grid; grid-template-rows: 22px 10px; justify-items: center; align-content: center; padding: 1px; height: 39px; border: 0; border-radius: 11px; background: transparent; }
.day[aria-pressed="true"] { background: var(--lavender); color: white; }
.dot { color: var(--lavender); font-size: 15px; line-height: 9px; }
.day[aria-pressed="true"] .dot { color: white; }
.summaries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summaries div, .point-detail, .chart-card { border: 1px solid var(--edge); border-radius: 17px; padding: 8px; text-align: center; background: #ffffff6b; }
.summaries strong { display: block; font-size: clamp(21px, 6vw, 32px); white-space: nowrap; }
.chart-card { color: #37343c; background: #fff; }
#plot { width: 100%; display: block; }
#plot text { fill: #37343c; font-size: 15px; }
#plot .grid { stroke: #d8d5dc; stroke-dasharray: 3 3; }
#plot .axis { stroke: #8a858e; }
#plot .trend { stroke: #3d3943; stroke-width: 1.6; fill: none; }
#plot .marker { fill: #3d3943; }
#plot .plot-point { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
#plot .point-hit { fill: transparent; }
#plot .plot-point:focus-visible .marker, #plot .plot-point[aria-pressed="true"] .marker { stroke: #817987; stroke-width: 3; }
.point-detail { margin-top: 12px; }
.point-detail dl { margin: 5px 4px; }
.point-detail dl div { text-align: left; display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr); padding: 5px; border-top: 1px solid #e8dff0; }
.point-detail dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#status, #save-status { text-align: center; margin: 6px 0; font-size: 15px; }
#status:empty, #save-status:empty { display: none; }
#room-controls { margin: 12px 0 0; text-align: center; font-size: 14px; }
#room-controls summary { cursor: pointer; }
#room-controls button { margin-top: 8px; border: 1px solid var(--edge); border-radius: 12px; background: white; padding: 4px 12px; }
#new-code { display: block; font: 16px monospace; padding: 6px 0; overflow-wrap: anywhere; user-select: all; }
nav { position: fixed; inset: auto 0 0; background: #fbf6fdef; border-top: 1px solid var(--edge); display: flex; justify-content: center; padding: 7px 12px max(7px, env(safe-area-inset-bottom)); }
nav button { border: 0; background: transparent; min-height: 45px; width: min(44%, 224px); font-size: 20px; }
nav button + button { border-left: 1px solid var(--edge); }
nav [aria-current="page"] { background: radial-gradient(ellipse, #e6d5f5b5, transparent 70%); }
