:root {
  --bg: #edf7ff;
  --bg-accent: #d8ebfb;
  --panel: rgba(248, 253, 255, 0.9);
  --panel-strong: #f4faff;
  --ink: #1c2f46;
  --muted: #536b82;
  --line: rgba(28, 67, 104, 0.14);
  --accent: #2a7fce;
  --accent-soft: rgba(42, 127, 206, 0.16);
  --cool: #155b95;
  --cool-soft: rgba(21, 91, 149, 0.14);
  --active: #0b6fa8;
  --shadow: 0 24px 60px rgba(22, 69, 113, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(87, 174, 236, 0.22), transparent 34%),
    radial-gradient(circle at top right, rgba(29, 112, 178, 0.2), transparent 26%),
    linear-gradient(180deg, var(--bg), #eaf4ff 55%, #dbeafb 100%);
}

body.has-entry-splash {
  overflow: hidden;
}

body.has-patch-notes {
  overflow: hidden;
}


.entry-splash {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(76, 170, 234, 0.12), transparent 48%),
    linear-gradient(180deg, #041633 0%, #062451 52%, #04193a 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.58s ease, visibility 0.58s ease;
}

.entry-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.entry-splash-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(92vw, 800px);
  max-width: 800px;
  padding: 22px 30px 18px;
  border-radius: 24px;
  border: 1px solid rgba(148, 220, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(9, 40, 82, 0.38), rgba(7, 29, 61, 0.42)),
    radial-gradient(circle at top, rgba(148, 220, 255, 0.12), transparent 68%);
  box-shadow:
    0 24px 60px rgba(2, 11, 28, 0.38),
    inset 0 0 0 1px rgba(190, 236, 255, 0.08);
  animation: splash-card-enter 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.entry-splash-logo {
  width: min(34vw, 196px);
  height: auto;
  display: block;
  border-radius: 38px;
  box-shadow:
    0 18px 44px rgba(6, 20, 44, 0.42),
    0 0 24px rgba(132, 219, 255, 0.18);
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  animation: splash-logo-appear 0.84s cubic-bezier(0.15, 0.88, 0.28, 1) 0.16s forwards;
}

.entry-splash-title {
  margin: 0;
  position: relative;
  width: 100%;
  text-align: center;
  color: #e8f6ff;
  font-size: clamp(2rem, 5.8vw, 4.2rem);
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.08em;
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow:
    0 12px 30px rgba(56, 178, 245, 0.38),
    0 0 16px rgba(145, 228, 255, 0.24);
  opacity: 0;
  transform: translateY(8px);
  animation: splash-title-appear 0.72s ease 0.56s forwards;
}

.entry-splash-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 74%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(180, 236, 255, 0.88), transparent);
  transform: translateX(-50%) scaleX(0.5);
  transform-origin: center;
  opacity: 0;
  animation: splash-title-underline 0.52s ease 0.9s forwards;
}

.entry-splash-subtitle {
  margin: 8px 0 0;
  width: 100%;
  text-align: center;
  color: rgba(214, 242, 255, 0.9);
  font-size: clamp(0.76rem, 1.8vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  animation: splash-subtitle-appear 0.62s ease 0.84s forwards;
}


.fullscreen-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(5, 10, 15, 0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.fullscreen-curtain.is-active {
  visibility: visible;
  opacity: 1;
}

.fullscreen-curtain.is-entering {
  animation: fullscreen-curtain-in 0.36s ease forwards;
}

.fullscreen-curtain.is-leaving {
  animation: fullscreen-curtain-out 0.32s ease forwards;
}

.fullscreen-curtain-text {
  margin: 0;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafb;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fullscreen-timer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10900;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 17, 39, 0.48);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.fullscreen-timer-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fullscreen-timer-card {
  width: min(96vw, 1440px);
  max-height: calc(100vh - 36px);
  padding: clamp(18px, 2.2vw, 30px);
  border-radius: 34px;
  border: 1px solid rgba(154, 216, 255, 0.34);
  background:
    radial-gradient(circle at top right, rgba(86, 188, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(246, 252, 255, 0.985), rgba(229, 242, 255, 0.965));
  box-shadow: 0 24px 72px rgba(5, 24, 49, 0.24);
  text-align: center;
  overflow: auto;
  overscroll-behavior: contain;
}

.fullscreen-timer-label,
.fullscreen-timer-title {
  margin: 0;
}

.fullscreen-timer-heading {
  max-width: 760px;
  margin: 0 auto;
}

.fullscreen-timer-label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fullscreen-timer-title {
  margin-top: 8px;
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  color: var(--ink);
}

.fullscreen-timer-copy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.14rem);
  line-height: 1.7;
}

.fullscreen-timer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(10px, 1.4vw, 14px);
  align-items: center;
  justify-items: center;
  margin-top: clamp(8px, 1.2vw, 12px);
  min-height: calc(100vh + 360px);
  align-content: start;
}

.fullscreen-timer-visual {
  display: grid;
  place-items: center;
  min-height: 100%;
  width: 100%;
}

.fullscreen-timer-ring {
  --timer-progress: 1;
  width: min(74vw, 62vh, 780px);
  aspect-ratio: 1;
  margin: 0;
  padding: clamp(14px, 1.6vw, 22px);
  border-radius: 50%;
  background:
    conic-gradient(
      from -90deg,
      rgba(176, 214, 237, 0.24) calc((1 - var(--timer-progress)) * 1turn),
      rgba(45, 165, 236, 0.98) 0turn
    );
  box-shadow:
    0 0 0 16px rgba(164, 219, 255, 0.08),
    0 34px 96px rgba(13, 76, 126, 0.18);
}

.fullscreen-timer-ring-core {
  width: 100%;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at top, rgba(164, 219, 255, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(244, 251, 255, 0.98), rgba(228, 243, 255, 0.96));
  box-shadow: inset 0 0 0 1px rgba(160, 210, 243, 0.26);
}

.fullscreen-timer-caption {
  margin: -6px 0 8px;
  color: rgba(83, 112, 139, 0.8);
  font-size: clamp(0.86rem, 1.3vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fullscreen-timer-display {
  margin: 0;
  color: var(--ink);
  font-size: clamp(4.2rem, 10.2vw, 8.6rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
}

.fullscreen-timer-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fullscreen-timer-actions {
  margin-top: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.fullscreen-timer-controls {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: center;
  width: min(100%, 760px);
  text-align: center;
  margin-top: max(42vh, 320px);
  padding-bottom: 24px;
}

.fullscreen-timer-field .toolbar-label {
  font-size: 0.82rem;
}

.fullscreen-timer-field .toolbar-input {
  min-height: 48px;
  font-size: 1.15rem;
  font-weight: 700;
}

.fullscreen-timer-status {
  margin: 0;
  min-height: 28px;
  font-size: 1rem;
}

body.timer-presentation-mode .page-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.timer-presentation-mode .fullscreen-timer-overlay {
  background:
    radial-gradient(circle at center, rgba(117, 210, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(3, 17, 39, 0.7), rgba(6, 25, 48, 0.82));
}

@media (max-width: 980px) {
  .fullscreen-timer-layout {
    min-height: auto;
  }

  .fullscreen-timer-ring {
    width: min(88vw, 62vh, 700px);
  }
}

@media (max-width: 640px) {
  .fullscreen-timer-inputs {
    grid-template-columns: minmax(0, 1fr);
  }
}

.journal-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 23, 39, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.journal-alert-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.journal-alert-box {
  width: min(92vw, 720px);
  padding: clamp(28px, 5vw, 46px);
  border-radius: 26px;
  border: 1px solid rgba(21, 91, 149, 0.28);
  background: linear-gradient(180deg, rgba(243, 249, 255, 0.98), rgba(227, 241, 255, 0.96));
  box-shadow: 0 28px 70px rgba(8, 24, 44, 0.34);
  text-align: center;
}

.journal-alert-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(0.82rem, 1.5vw, 1rem);
}

.journal-alert-text {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: clamp(2rem, 5.8vw, 4.4rem);
  font-weight: 700;
  line-height: 1.02;
}

.lesson-end-overlay {
  position: fixed;
  inset: 0;
  z-index: 10400;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(109, 208, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(4, 12, 24, 0.74), rgba(7, 23, 39, 0.8));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.36s ease, visibility 0.36s ease;
}

.lesson-end-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.lesson-end-overlay.is-active .lesson-end-box {
  animation: lesson-end-box-in 0.48s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.lesson-end-overlay.is-leaving .lesson-end-box {
  animation: lesson-end-box-out 0.42s ease forwards;
}

.lesson-end-box {
  position: relative;
  overflow: hidden;
  width: min(94vw, 980px);
  padding: clamp(28px, 5vw, 54px);
  border-radius: 32px;
  border: 1px solid rgba(188, 234, 255, 0.42);
  background: linear-gradient(180deg, rgba(232, 248, 255, 0.24), rgba(186, 229, 255, 0.12));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  text-align: center;
  transform: scale(0.92) translateY(18px);
  opacity: 0;
  backdrop-filter: blur(16px);
}

.lesson-end-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
  filter: blur(1px);
}

.lesson-end-ripple.is-rippling {
  animation: lesson-end-ripple-wave 1s ease-out forwards;
}

.lesson-end-ripple-outer {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.72);
  filter: blur(0);
}

.lesson-end-ripple-outer.is-rippling {
  animation: lesson-end-ripple-wave-outer 1.45s ease-out forwards;
}

.lesson-end-label {
  margin: 0;
  color: rgba(215, 236, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.78rem, 1.6vw, 1rem);
  font-weight: 700;
}

.lesson-end-clock {
  margin: 18px 0 0;
  color: #f8fcff;
  font-size: clamp(4rem, 14vw, 8.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-shadow: 0 0 34px rgba(126, 213, 255, 0.26);
}

.lesson-end-text {
  margin: 16px 0 0;
  color: rgba(231, 246, 255, 0.94);
  font-size: clamp(1.2rem, 3.2vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
}

.patch-notes-overlay {
  position: fixed;
  inset: 0;
  z-index: 10800;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 17, 39, 0.62);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.patch-notes-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.patch-notes-card {
  width: min(92vw, 520px);
  padding: clamp(18px, 2.7vw, 26px);
  border-radius: 20px;
  border: 1px solid rgba(120, 196, 245, 0.4);
  background:
    linear-gradient(180deg, rgba(247, 252, 255, 0.98), rgba(236, 248, 255, 0.96));
  box-shadow:
    0 18px 44px rgba(5, 24, 49, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.68);
  transform: translateY(-8px) scale(0.96);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.24s ease;
}

.patch-notes-overlay.is-active .patch-notes-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.patch-notes-label {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.patch-notes-title {
  margin: 8px 0 0;
  font-size: clamp(1.22rem, 2.8vw, 1.78rem);
  line-height: 1.2;
  color: var(--ink);
}

.patch-notes-version {
  margin: 6px 0 0;
  color: var(--cool);
  font-size: 0.88rem;
  font-weight: 700;
}

.patch-notes-list {
  margin: 12px 0 0;
  padding: 0 0 0 20px;
  color: var(--ink);
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  line-height: 1.65;
}

.patch-notes-list li + li {
  margin-top: 4px;
}

.patch-notes-close {
  margin-top: 14px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid rgba(16, 76, 127, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, #2b8ad7, #1d74be);
  color: #f2f9ff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.patch-notes-close:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

@media (max-width: 640px) {
  .patch-notes-overlay {
    padding: 14px;
  }

  .patch-notes-card {
    width: min(96vw, 520px);
  }
}

@keyframes splash-card-enter {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    filter: blur(5px);
  }

  68% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes splash-logo-appear {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    filter: brightness(0.88) saturate(0.86);
  }

  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.03);
    filter: brightness(1.04) saturate(1.08);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
}

@keyframes splash-title-appear {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    letter-spacing: 0.12em;
  }

  75% {
    opacity: 1;
    transform: translateY(0) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    letter-spacing: 0.08em;
  }
}

@keyframes splash-subtitle-appear {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-title-underline {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.5);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes fullscreen-curtain-in {
  0% {
    opacity: 0;
    transform: scale(1.02);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fullscreen-curtain-out {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes lesson-end-box-in {
  0% {
    transform: scale(0.92) translateY(18px);
    opacity: 0;
  }

  55% {
    transform: scale(1.02) translateY(0);
    opacity: 1;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes lesson-end-box-out {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  100% {
    transform: scale(0.96) translateY(10px);
    opacity: 0;
  }
}

@keyframes lesson-end-ripple-wave {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0.7;
  }

  100% {
    transform: translate(-50%, -50%) scale(18);
    opacity: 0;
  }
}

@keyframes lesson-end-ripple-wave-outer {
  0% {
    transform: translate(-50%, -50%) scale(0.24);
    opacity: 0;
  }

  18% {
    opacity: 0.72;
  }

  100% {
    transform: translate(-50%, -50%) scale(24);
    opacity: 0;
  }
}

.page-shell {
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.hero-editor {
  align-items: center;
}

.eyebrow,
.panel-label,
.status-label,
.week-day {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--muted);
}

.hero h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.hero-credit {
  margin: 12px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--cool-soft);
  color: var(--cool);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-credit::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-copy {
  margin: 0 0 18px;
  max-width: 720px;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-field {
  display: grid;
  gap: 6px;
}

.toolbar-field-wide {
  min-width: min(460px, 100%);
}

.toolbar-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.toolbar-select,
.toolbar-input,
.editor-input {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid rgba(30, 45, 53, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
}

.toolbar-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.hero-link,
.action-button,
.ghost-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #f7fbff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-link:hover,
.action-button:hover,
.ghost-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.mini-button {
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  border-color: rgba(30, 45, 53, 0.1);
}

.danger-button,
.mini-button-danger {
  color: #9a3928;
  border-color: rgba(154, 57, 40, 0.18);
  background: rgba(245, 209, 201, 0.55);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.time-panel,
.focus-panel,
.today-panel {
  padding: 28px;
}

.week-panel {
  grid-column: 1 / -1;
  padding: 20px 24px 24px;
}

.today-panel {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cool);
  background: var(--cool-soft);
}

.clock {
  margin: 14px 0 8px;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.date-text {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.status-strip > div {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(216, 235, 251, 0.58));
  border: 1px solid rgba(30, 45, 53, 0.08);
}

.status-value {
  margin: 8px 0 0;
  font-size: 1.28rem;
  font-weight: 700;
}

.progress-wrap {
  margin-top: 18px;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(30, 45, 53, 0.08);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #59aef0);
  transition: width 0.4s ease;
}

.section-title {
  margin: 12px 0 0;
  font-size: 1.36rem;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.focus-card {
  min-height: 124px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(238, 248, 255, 0.86));
  border: 1px solid rgba(30, 45, 53, 0.08);
}

.focus-card-main {
  grid-column: 1 / -1;
  min-height: 146px;
  background: linear-gradient(135deg, rgba(21, 91, 149, 0.14), rgba(244, 250, 255, 0.96));
}

.focus-value {
  margin: 10px 0 0;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 700;
}

.focus-value-small {
  font-size: 1.3rem;
}

[data-next-focus] {
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.focus-note {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
  white-space: pre-line;
}

.period-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.period-card {
  min-height: 132px;
  padding: 15px 16px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.period-card.is-done {
  opacity: 0.62;
  background: rgba(225, 239, 252, 0.72);
}

.period-card.is-active {
  transform: translateY(-2px);
  background: #f4faff;
  border-color: rgba(120, 140, 160, 0.3);
  color: #1c2f46;
}

.period-card.is-next {
  background: linear-gradient(135deg, #b9f6ca, #69f0ae);
  border-color: rgba(0, 200, 83, 0.4);
  color: #0b3d2e;
}

.period-card.is-active .period-name,
.period-card.is-active .period-time,
.period-card.is-active .period-note {
  color: #1c2f46;
  font-weight: 700;
}

.period-card.is-next .period-name,
.period-card.is-next .period-time,
.period-card.is-next .period-note {
  color: #0b3d2e;
  font-weight: 700;
}

.period-top,
.period-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.period-bottom {
  flex-direction: column;
  align-items: flex-start;
}

.period-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.period-time,
.period-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: pre-line;
}

.period-status {
  color: var(--cool);
  background: var(--cool-soft);
}

.period-status.status-now {
  color: #00a152;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.period-status.status-next {
  color: #00a152;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.period-status.status-done {
  color: #52606a;
  background: rgba(83, 98, 109, 0.12);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.week-column {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.week-column.is-today {
  background: linear-gradient(180deg, rgba(21, 91, 149, 0.12), rgba(255, 255, 255, 0.86));
  border-color: rgba(21, 91, 149, 0.24);
}

.week-column h3 {
  margin: 8px 0 0;
  font-size: 1rem;
}

.week-column-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.week-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cool-soft);
  color: var(--cool);
  font-size: 0.76rem;
  font-weight: 700;
}

.week-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.week-item {
  padding: 10px;
  border-radius: 14px;
  background: rgba(242, 249, 255, 0.9);
  border: 1px solid rgba(30, 45, 53, 0.08);
}

.week-item strong,
.week-item span {
  display: block;
}

.week-item strong {
  font-size: 0.85rem;
}

.week-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

body.presentation-mode {
  overflow: hidden;
}

body.presentation-mode .page-shell {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  padding: 12px;
}

body.presentation-mode .dashboard {
  margin: 0;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  height: calc(100vh - 24px);
}

body.presentation-mode .time-panel,
body.presentation-mode .focus-panel {
  padding: clamp(56px, 8vh, 96px) 30px 30px;
  height: 100%;
  background: #f3f9ff;
  border-color: rgba(30, 45, 53, 0.1);
  box-shadow: 0 14px 36px rgba(30, 45, 53, 0.1);
}

body.presentation-mode .status-strip > div,
body.presentation-mode .focus-card {
  background: #f3f9ff;
  border-color: rgba(30, 45, 53, 0.1);
}

body.presentation-mode .panel-label {
  font-size: 0.94rem;
}

body.presentation-mode .badge {
  font-size: 1rem;
  padding: 10px 16px;
}

body.presentation-mode .clock {
  font-size: clamp(5rem, 10.5vw, 10rem);
  line-height: 0.92;
}

body.presentation-mode .date-text {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

body.presentation-mode .status-value {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
}

body.presentation-mode .section-title {
  font-size: clamp(2rem, 2.6vw, 2.8rem);
}

body.presentation-mode .status-label {
  font-size: 0.95rem;
}

body.presentation-mode .focus-value {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
}

body.presentation-mode .focus-value-small {
  font-size: clamp(1.9rem, 2.4vw, 2.6rem);
}

body.presentation-mode [data-next-focus] {
  line-height: 1.35;
}

body.presentation-mode .hero,
body.presentation-mode .today-panel,
body.presentation-mode .week-panel {
  display: none;
}

.editor-layout {
  display: grid;
  gap: 18px;
}

.editor-panel {
  padding: 24px 28px 28px;
}

.editor-toolbar {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.day-tab {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(30, 45, 53, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.day-tab.is-active {
  background: var(--cool-soft);
  color: var(--cool);
  border-color: rgba(21, 91, 149, 0.2);
}

.editor-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.editor-row,
.editor-empty {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 247, 255, 0.9));
  border: 1px solid rgba(30, 45, 53, 0.08);
}

.editor-empty {
  color: var(--muted);
}

.editor-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(120px, 0.6fr)) 1.4fr;
  gap: 12px;
}

.editor-field {
  display: grid;
  gap: 6px;
}

.editor-field span {
  font-size: 0.78rem;
  color: var(--muted);
}

.editor-field-wide {
  min-width: 0;
}

.editor-field-full {
  grid-column: 1 / -1;
}

.editor-row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.editor-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
}

.editor-status[data-tone="success"] {
  color: #0e5f92;
}

.editor-status[data-tone="error"] {
  color: #9a3928;
}

.test-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.test-panel {
  padding: 24px 28px 28px;
}

.test-panel-wide {
  grid-column: 1 / -1;
}

.test-controls {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(180px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}


.test-clock-board {
  margin-top: 18px;
}

.test-dashboard {
  width: 100%;
}

.test-preview-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.test-preview-card {
  min-height: 108px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(30, 45, 53, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(236, 247, 255, 0.9));
}

.test-preview-card .focus-value {
  margin-top: 8px;
}

[data-sim-next-focus] {
  white-space: pre-line;
  line-height: 1.35;
}

.test-summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.test-summary[data-tone="success"] {
  color: #0e5f92;
  font-weight: 700;
}

.test-summary[data-tone="error"] {
  color: #9a3928;
  font-weight: 700;
}

.test-results {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.test-result-item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(236, 247, 255, 0.9));
}

.test-result-item.is-pass {
  border-color: rgba(11, 111, 168, 0.28);
}

.test-result-item.is-fail {
  border-color: rgba(154, 57, 40, 0.32);
}

.test-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.test-result-top strong {
  font-size: 0.95rem;
}

.test-result-badge {
  min-width: 66px;
  padding: 6px 10px;
}

.test-result-item.is-pass .test-result-badge {
  color: #0e5f92;
  background: rgba(11, 111, 168, 0.16);
}

.test-result-item.is-fail .test-result-badge {
  color: #9a3928;
  background: rgba(154, 57, 40, 0.16);
}

.test-result-detail {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .focus-grid {
    grid-template-columns: 1fr 1fr;
  }

  .test-layout {
    grid-template-columns: 1fr;
  }

  .test-controls {
    grid-template-columns: 1fr;
  }

  .test-preview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-field-wide,
  .toolbar-inline,
  .editor-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .time-panel,
  .focus-panel,
  .today-panel,
  .week-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .test-preview-grid {
    grid-template-columns: 1fr;
  }

  .focus-card-main {
    grid-column: auto;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .period-list {
    grid-template-columns: 1fr;
  }

  .hero-tools,
  .button-row {
    width: 100%;
  }

  .hero-link,
  .action-button,
  .ghost-button {
    width: 100%;
  }
}
