:root {
  --circle-ink: #233c49;
  --circle-sky: #70c9eb;
  --circle-sky-light: #e7f8ff;
  --circle-yellow: #ffd966;
  --circle-coral: #ff8f7d;
  --circle-green: #8ed6ad;
  --circle-purple: #c5a7ed;
  --circle-cream: #fffaf0;
}

* { box-sizing: border-box; }

body.circle-time-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 11%, rgba(255,255,255,.68) 0 6px, transparent 7px),
    radial-gradient(circle at 92% 35%, rgba(255,255,255,.55) 0 8px, transparent 9px),
    linear-gradient(180deg, #dff6ff 0, #fffaf0 520px);
  background-size: 76px 76px, 94px 94px, auto;
  color: var(--circle-ink);
}

.circle-time-page button { font: inherit; }
.circle-time-page .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.circle-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 11px clamp(15px, 3vw, 42px);
  border-bottom: 2px solid rgba(35,60,73,.16);
  background: rgba(239,250,255,.94);
  box-shadow: 0 7px 24px rgba(35,60,73,.1);
  backdrop-filter: blur(12px);
}

.circle-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--circle-ink);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.circle-brand .brand-mark span:nth-child(1) { background: var(--circle-sky); }
.circle-brand .brand-mark span:nth-child(2) { background: var(--circle-yellow); }
.circle-brand .brand-mark span:nth-child(3) { background: var(--circle-coral); }
.circle-actions { display: flex; justify-content: flex-end; gap: 8px; }

.circle-action {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 2px solid var(--circle-ink);
  border-radius: 15px;
  background: #fff;
  box-shadow: 2px 3px 0 var(--circle-ink);
  color: var(--circle-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.circle-action span { font-size: 19px; }
.circle-action.today-action { background: var(--circle-yellow); }
.circle-action:active { box-shadow: none; transform: translateY(2px); }

.circle-shell {
  width: min(1380px, calc(100% - 34px));
  margin: 0 auto;
  padding: 30px 0 70px;
}

.circle-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 19px;
  padding: clamp(22px, 3vw, 36px);
  border: 3px solid var(--circle-ink);
  border-radius: 30px;
  background: linear-gradient(125deg, rgba(255,255,255,.94), rgba(255,249,217,.94));
  box-shadow: 7px 8px 0 var(--circle-ink);
}

.circle-kicker { margin: 0 0 7px; color: #16728f; font-size: 13px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.circle-welcome h1 { margin: 0 0 8px; font-size: clamp(35px, 4.8vw, 60px); letter-spacing: -.045em; }
.circle-welcome h1 em { color: #1382a5; font-family: var(--hand); font-style: normal; }
.circle-welcome p:last-child { max-width: 730px; margin: 0; color: #536b76; font-size: clamp(15px, 1.7vw, 19px); font-weight: 700; }
.hello-buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.hello-buttons button,
.ask-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 2px solid var(--circle-ink);
  border-radius: 16px;
  background: #fff;
  box-shadow: 3px 4px 0 var(--circle-ink);
  color: var(--circle-ink);
  cursor: pointer;
  font-weight: 900;
}

.hello-buttons button span { font-size: 25px; }
.hello-buttons button:active,
.ask-button:active { box-shadow: none; transform: translateY(3px); }
.audio-message { min-height: 24px; margin: 0 4px 11px; color: #16728f; font-size: 14px; font-weight: 900; text-align: center; }

.daily-board { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.board-panel { position: relative; overflow: hidden; padding: clamp(20px, 2.4vw, 32px); border: 3px solid var(--circle-ink); border-radius: 30px; box-shadow: 7px 8px 0 var(--circle-ink); }
.calendar-panel { grid-column: 1 / -1; background: #fff7c9; }
.weather-panel { background: #e1f6ff; }
.feelings-panel { background: #ffe5e0; }
.season-panel { grid-column: 1 / -1; background: #e5f6e9; }

.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.panel-title-wrap { display: flex; align-items: center; gap: 13px; }
.panel-icon { display: grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; border: 2px solid var(--circle-ink); border-radius: 18px; background: #fff; font-size: 31px; box-shadow: 3px 4px 0 var(--circle-ink); }
.panel-heading p { margin: 0 0 1px; color: #54717d; font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.panel-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.035em; }
.ask-button { min-height: 49px; padding: 8px 14px; box-shadow: 2px 3px 0 var(--circle-ink); }

.day-slots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.board-slot {
  position: relative;
  display: flex;
  min-height: 110px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px;
  border: 3px dashed rgba(35,60,73,.48);
  border-radius: 21px;
  background: rgba(255,255,255,.65);
  color: var(--circle-ink);
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.board-slot small { color: #5d717a; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.board-slot .slot-value { font-size: clamp(18px, 2vw, 25px); font-weight: 950; }
.board-slot.active-slot { border-style: solid; border-color: var(--circle-ink); background: #fff; box-shadow: 4px 5px 0 var(--circle-ink); }
.board-slot.active-slot::after { position: absolute; top: -10px; right: -8px; display: grid; width: 25px; height: 25px; place-items: center; border: 2px solid var(--circle-ink); border-radius: 50%; background: var(--circle-yellow); content: "✓"; font-size: 13px; font-weight: 950; }
.board-slot.drop-ready { outline: 6px solid rgba(22,130,165,.25); transform: scale(1.02); }
.board-slot.has-value { border-style: solid; }
.tap-hint { margin: 14px 0 10px; color: #6e642b; font-size: 13px; font-weight: 850; text-align: center; }

.piece-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.move-piece {
  display: inline-flex;
  min-width: 92px;
  min-height: 70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 10px;
  border: 2px solid var(--circle-ink);
  border-radius: 15px;
  background: #fff;
  box-shadow: 3px 4px 0 var(--circle-ink);
  color: var(--circle-ink);
  cursor: grab;
  user-select: none;
}

.move-piece > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--circle-sky-light); font-family: var(--hand); font-size: 22px; font-weight: 950; }
.move-piece strong { font-size: 13px; }
.move-piece:hover { transform: translateY(-3px); }
.move-piece:active { cursor: grabbing; box-shadow: none; transform: translateY(3px); }
.move-piece.is-chosen { background: var(--circle-yellow); }

.date-builder { display: grid; grid-template-columns: minmax(230px,.6fr) minmax(0,1.4fr); align-items: center; gap: 20px; margin-top: 22px; padding-top: 20px; border-top: 2px dashed rgba(35,60,73,.3); }
.date-label { margin: 0 0 7px; color: #6e642b; font-weight: 950; text-align: center; }
.date-slots { display: grid; grid-template-columns: .65fr 1.35fr; gap: 9px; }
.date-slot,.month-slot { min-height: 96px; }
.date-piece-area { display: grid; gap: 9px; }
.piece-drawer { border: 2px solid rgba(35,60,73,.32); border-radius: 15px; background: rgba(255,255,255,.58); }
.piece-drawer summary { padding: 12px 15px; cursor: pointer; font-weight: 950; }
.piece-drawer .piece-tray { max-height: 235px; overflow-y: auto; padding: 3px 12px 14px; }
.number-pieces .move-piece { min-width: 48px; min-height: 48px; padding: 6px; }
.number-pieces .move-piece > span { width: auto; height: auto; background: transparent; font-family: inherit; font-size: 17px; }
.month-pieces .move-piece { min-width: 102px; min-height: 48px; }
.month-pieces .move-piece > span { display: none; }

.picture-slot { width: min(310px, 100%); min-height: 170px; margin: 0 auto 17px; }
.picture-slot .empty-picture { font-family: var(--hand); font-size: 66px; font-weight: 950; line-height: .85; }
.picture-slot.has-value .empty-picture { font-size: 70px; }
.picture-pieces .move-piece { min-width: 104px; min-height: 104px; }
.picture-piece > span { width: auto; height: auto; background: transparent; font-family: inherit; font-size: 43px; line-height: 1; }
.picture-piece strong { font-size: 14px; }
.weather-panel .move-piece.is-chosen { background: #bcecff; }
.feelings-panel .move-piece.is-chosen { background: #ffc6bc; }

.offscreen-prompt {
  display: flex;
  width: 100%;
  min-height: 67px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 15px;
  border: 2px dashed #16728f;
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  color: var(--circle-ink);
  cursor: pointer;
}
.offscreen-prompt > span { font-size: 30px; }
.offscreen-prompt strong,.offscreen-prompt small { display: block; text-align: left; }
.offscreen-prompt small { color: #5a7480; }
.feelings-note { margin: 20px 0 0; color: #8f4b40; font-size: 13px; font-weight: 850; text-align: center; }

.season-panel .picture-slot { min-height: 150px; }
.season-pieces .move-piece { min-width: 135px; min-height: 104px; }
.season-panel .move-piece.is-chosen { background: #bee8c8; }
.movement-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin-top: 20px; padding: 14px 16px; border: 2px solid var(--circle-ink); border-radius: 20px; background: rgba(255,255,255,.7); }
.movement-emoji { font-size: 48px; }
.movement-card small,.movement-card strong { display: block; }
.movement-card small { margin-bottom: 3px; color: #4f755d; font-weight: 900; text-transform: uppercase; }
.movement-card strong { font-size: clamp(16px, 2vw, 21px); }
.movement-card button { min-height: 50px; padding: 9px 13px; border: 2px solid var(--circle-ink); border-radius: 14px; background: var(--circle-green); box-shadow: 2px 3px 0 var(--circle-ink); color: var(--circle-ink); cursor: pointer; font-weight: 900; }

.today-sentence { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; margin-top: 25px; padding: clamp(22px, 3vw, 34px); border: 3px solid var(--circle-ink); border-radius: 28px; background: var(--circle-purple); box-shadow: 7px 8px 0 var(--circle-ink); }
.sentence-mascot { display: grid; width: 78px; height: 78px; place-items: center; border: 3px solid var(--circle-ink); border-radius: 50%; background: #fff; font-size: 42px; }
.today-sentence p { margin: 0 0 2px; color: #4e3b66; font-size: 11px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.today-sentence h2 { margin: 0 0 8px; font-size: clamp(23px, 3vw, 34px); }
.sentence-preview { font-size: clamp(16px, 2vw, 21px); font-weight: 800; line-height: 1.5; }
.today-sentence button { display: inline-flex; min-height: 62px; align-items: center; gap: 8px; padding: 12px 17px; border: 3px solid var(--circle-ink); border-radius: 17px; background: #fff; box-shadow: 3px 4px 0 var(--circle-ink); color: var(--circle-ink); cursor: pointer; }
.today-sentence button span { font-size: 25px; }

.circle-dialog { width: min(900px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: clamp(24px, 4vw, 42px); border: 3px solid var(--circle-ink); border-radius: 27px; background: var(--circle-cream); box-shadow: 9px 10px 0 var(--circle-ink); color: var(--circle-ink); }
.circle-dialog::backdrop { background: rgba(24,43,52,.65); backdrop-filter: blur(3px); }
.circle-dialog > form { float: right; }
.circle-dialog-close { display: grid; width: 46px; height: 46px; place-items: center; border: 2px solid var(--circle-ink); border-radius: 50%; background: #fff; color: var(--circle-ink); cursor: pointer; font-size: 29px; font-weight: 900; }
.circle-dialog h2 { max-width: 650px; margin-bottom: 24px; font-size: clamp(28px, 4vw, 42px); }
.info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.info-grid article { padding: 17px; border: 2px solid rgba(35,60,73,.25); border-radius: 18px; background: #fff; }
.info-grid article > span { font-size: 29px; }
.info-grid h3 { margin: 7px 0 4px; font-size: 18px; }
.info-grid p { margin: 0; color: #586c76; font-size: 14px; line-height: 1.55; }
.privacy-note { margin: 17px 0 0; padding: 11px 14px; border-radius: 13px; background: var(--circle-sky-light); font-size: 13px; font-weight: 850; }

@media (max-width: 980px) {
  .circle-toolbar { align-items: flex-start; }
  .circle-actions { flex-wrap: wrap; }
  .circle-action { min-height: 47px; }
  .circle-welcome { align-items: flex-start; flex-direction: column; }
  .hello-buttons { justify-content: flex-start; }
  .daily-board { grid-template-columns: 1fr; }
  .calendar-panel,.season-panel { grid-column: auto; }
  .date-builder { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .circle-toolbar { position: relative; flex-direction: column; gap: 9px; }
  .circle-actions { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .circle-action { padding-inline: 8px; }
  .circle-shell { width: min(100% - 20px,1380px); padding-top: 18px; }
  .circle-welcome { padding: 22px 18px; border-radius: 22px; box-shadow: 4px 5px 0 var(--circle-ink); }
  .hello-buttons { display: grid; width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hello-buttons button { min-width: 0; min-height: 83px; flex-direction: column; padding: 8px 5px; font-size: 11px; }
  .board-panel { padding: 19px 14px; border-radius: 23px; box-shadow: 4px 5px 0 var(--circle-ink); }
  .panel-heading { align-items: flex-start; }
  .panel-icon { width: 47px; height: 47px; font-size: 25px; }
  .ask-button { flex-direction: column; min-width: 55px; padding: 5px; font-size: 11px; }
  .day-slots { grid-template-columns: 1fr; }
  .day-slot { min-height: 82px; }
  .day-pieces { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .day-pieces .move-piece { width: 100%; min-width: 0; }
  .date-slots { grid-template-columns: .75fr 1.25fr; }
  .picture-pieces { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .picture-pieces .move-piece { width: 100%; min-width: 0; }
  .season-pieces { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .movement-card { grid-template-columns: auto 1fr; }
  .movement-card button { grid-column: 1 / -1; }
  .today-sentence { grid-template-columns: auto 1fr; padding: 20px 15px; box-shadow: 4px 5px 0 var(--circle-ink); }
  .sentence-mascot { width: 58px; height: 58px; font-size: 31px; }
  .today-sentence button { grid-column: 1 / -1; justify-content: center; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .circle-toolbar,.hello-buttons,.ask-button,.piece-tray,.piece-drawer,.offscreen-prompt,.movement-card,.today-sentence button { display: none !important; }
  body.circle-time-page { background: #fff; }
  .circle-shell { width: 100%; padding: 0; }
  .circle-welcome,.board-panel,.today-sentence { break-inside: avoid; box-shadow: none; }
}
