﻿:root {
  color-scheme: light;
  --ink: #101015;
  --muted: #6b6b77;
  --surface: #ffffff;
  --panel: #f6f4f0;
  --accent: #f2a541;
  --accent-strong: #e26b2d;
  --accent-soft: #ffe7c7;
  --grid: #d8d3c7;
  --shadow: 0 24px 60px rgba(12, 12, 18, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Space Grotesk", "Yu Gothic", "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", "Menlo", monospace;
}

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(circle at top left, #ecf1ff 0%, #e4ebff 40%, #d8e1ff 100%);
  min-height: 100vh;
}

.page {
  padding: 40px 48px 56px;
  max-width: 1400px;
  margin: 0 auto;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  animation: rise 0.8s ease-out;
}

.eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.2;
  margin: 0 0 12px;
}

.sub {
  color: var(--muted);
  max-width: 560px;
  margin: 0;
}

.hero-card {
  background: var(--surface);
  padding: 18px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 220px;
  display: grid;
  gap: 10px;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  animation: fade 0.9s ease-out;
}

.calendar-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 18px 22px;
  box-shadow: var(--shadow);
}

.month-bar {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  font-family: var(--mono);
  font-size: 19.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 4px 2px 10px;
}

.week-range {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding-left: 6px;
  margin-left: auto;
  transform: translateX(35px);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.control-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

button {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:active {
  transform: translateY(1px);
}

button.ghost {
  background: var(--panel);
  color: var(--ink);
}

.date-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--panel);
  border-radius: 999px;
}

.date-picker .icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: var(--ink);
}

.date-picker svg {
  width: 18px;
  height: 18px;
}

.date-picker input {
  border: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.date-picker input:focus {
  outline: none;
}

button.solid {
  background: var(--accent);
  color: #2a1c0f;
  box-shadow: 0 6px 18px rgba(242, 165, 65, 0.4);
}

button.solid:hover {
  background: var(--accent-strong);
  color: #fff;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  background: var(--panel);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.radio-group input {
  accent-color: var(--accent-strong);
}

.calendar {
  display: block;
  background-color: #fffdf8;
  background-image: linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 100% var(--row-height);
  background-position: 0 var(--header-height);
  min-width: 560px;
}

.calendar-scroll {
  --row-height: 20.8px;
  --rows-per-hour: 2;
  --header-height: calc(var(--row-height) * 2);
  display: grid;
  grid-template-columns: 70px minmax(560px, 1fr);
  border-radius: var(--radius-sm);
  border: 1px solid var(--grid);
  background: #fffdf8;
  max-height: 70vh;
  overflow: auto;
  position: relative;
}

.hour-gutter {
  display: grid;
  grid-template-rows: var(--header-height) repeat(24, calc(var(--row-height) * var(--rows-per-hour)));
  border-right: 1px solid var(--grid);
  background: #fffaf2;
  background-image: linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 100% var(--row-height);
  background-position: 0 var(--header-height);
}

.gutter-header {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  background: #fff8ee;
  border-bottom: 1px solid var(--grid);
}

.hour-gutter .hour-label {
  height: calc(var(--row-height) * var(--rows-per-hour));
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  border-bottom: 1px solid var(--grid);
}

.slot-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 16, 21, 0.9);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease;
  white-space: pre-line;
  z-index: 10;
}

.slot-tooltip.show {
  opacity: 1;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff8ee;
  border-bottom: 1px solid var(--grid);
  font-weight: 600;
  height: var(--header-height);
  grid-column: 1 / -1;
}

.header-cell {
  padding: 10px 12px;
  border-right: 1px solid var(--grid);
  font-size: 14px;
  display: flex;
  align-items: center;
}

.slot-cell {
  padding: 10px 12px;
  border-right: 1px solid var(--grid);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  height: var(--row-height);
}

.slot-cell:hover {
  background: var(--accent-soft);
}

.slot-cell.selected {
  background: var(--accent);
  color: #2a1c0f;
  font-weight: 600;
}

.slot-cell.sunday,
.header-cell.sunday {
  background: #ffe9e9;
}

.slot-cell.saturday,
.header-cell.saturday {
  background: #e8f5ff;
}

.slot-cell.sunday,
.slot-cell.saturday {
  box-shadow: inset 0 -1px 0 var(--grid);
}

.header-cell.sunday,
.header-cell.saturday {
  box-shadow: inset 0 -1px 0 var(--grid);
}


.slot-cell.sunday:hover,
.slot-cell.saturday:hover {
  background: var(--accent-soft);
}

.slot-cell.sunday.selected,
.slot-cell.saturday.selected {
  background: var(--accent);
}


.text-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 520px;
}

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

.text-header h2 {
  margin: 0;
  font-size: 18px;
}

.text-actions {
  display: flex;
  gap: 8px;
}

textarea {
  flex: 1;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grid);
  padding: 12px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  background: #fffdf8;
}

.text-footer {
  display: flex;
  justify-content: flex-end;
}

.copy-status {
  margin: -4px 0 0;
  min-height: 1.25em;
  font-size: 13px;
  color: var(--muted);
}

.copy-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .text-panel {
    min-height: 400px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 22px 12px 34px;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
  }
  .hero-card {
    width: 100%;
  }
  .calendar-panel,
  .text-panel {
    padding: 14px;
  }
  .controls {
    gap: 10px;
  }
  .control-group {
    width: 100%;
  }
  .week-range {
    margin-left: 0;
    transform: none;
    padding-left: 0;
  }
  .calendar-scroll {
    grid-template-columns: 54px minmax(560px, 1fr);
    max-height: 60vh;
  }
  .hour-gutter .hour-label {
    padding: 0 6px;
    font-size: 11px;
  }
  .header-cell {
    padding: 8px 9px;
    font-size: 12px;
  }
  .slot-cell {
    padding: 8px 9px;
  }
  .text-header {
    flex-direction: column;
    align-items: stretch;
  }
  .text-actions {
    width: 100%;
  }
  .text-actions button {
    flex: 1;
  }
  textarea {
    min-height: 220px;
  }
}
