:root {
  --bg: #fffaf7;
  --paper: #fffefd;
  --soft: #fff1ed;
  --soft-2: #f8fbf4;
  --text: #6f4038;
  --muted: #9a766f;
  --accent: #e97f8d;
  --accent-strong: #db6676;
  --green: #42a96d;
  --blue: #5b91c9;
  --yellow: #f2bb58;
  --border: #f1cfc8;
  --shadow: 0 18px 50px rgba(164, 88, 80, 0.12);
  --radius: 8px;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --sans: "Hiragino Sans", "Yu Gothic", "YuGothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 2%, rgba(239, 170, 174, 0.2), transparent 22rem),
    radial-gradient(circle at 92% 16%, rgba(245, 212, 181, 0.32), transparent 25rem),
    var(--bg);
  font-family: var(--sans);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.public-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 22px 24px 56px;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin: 0 -8px 28px;
  padding: 14px 8px;
  background: rgba(255, 250, 247, 0.9);
  backdrop-filter: blur(14px);
}

.public-header .app-brand {
  padding: 0;
}

.public-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.public-nav a {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.public-nav a:hover {
  color: var(--accent-strong);
  background: #fff1ed;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.hero-note {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 300px;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(255, 253, 251, 0.96), rgba(255, 253, 251, 0.82)),
    url("./assets/hero-piano.png") right center / auto 100% no-repeat;
}

.hero-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 54px);
}

.hero-copy p:not(.today-label) {
  max-width: 680px;
  margin: 0;
  color: #7a5650;
  font-size: 17px;
  font-weight: 700;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-note {
  padding: 26px;
  background: linear-gradient(180deg, #fff7f4, #fffefd);
}

.hero-note strong {
  display: block;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.hero-note ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 18px;
  align-items: start;
}

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

.guide-list,
.practice-grid {
  display: grid;
  gap: 12px;
}

.guide-list article {
  padding: 15px;
  border: 1px solid #f4dcd6;
  border-radius: var(--radius);
  background: #fffdfa;
}

.guide-list strong {
  display: block;
  margin-bottom: 7px;
}

.guide-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: #fffdfa;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

.faq-item b {
  color: var(--accent-strong);
  font-size: 22px;
}

.faq-answer {
  display: none;
  margin-top: -8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fffaf7;
  font-size: 14px;
  line-height: 1.8;
}

.faq-item.is-open + .faq-answer {
  display: block;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-columns: 292px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  border-right: 1px solid rgba(241, 207, 200, 0.8);
  background: rgba(255, 253, 251, 0.88);
  backdrop-filter: blur(14px);
  overflow-y: auto;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 6px 10px 26px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #ef9aa4, #e27382);
  font-size: 26px;
  box-shadow: var(--shadow);
}

.app-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.app-brand small {
  display: block;
  margin-top: 3px;
  color: var(--accent);
  font-weight: 700;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.text-button,
.mini-link,
.primary-action,
.line-button,
.home-link,
.icon-button {
  border: 0;
  cursor: pointer;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius);
  color: #744941;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.nav-item span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--muted);
}

.nav-item.is-active,
.nav-item:hover {
  color: white;
  background: linear-gradient(135deg, #e98794, #df6d7d);
  box-shadow: 0 14px 28px rgba(223, 109, 125, 0.22);
}

.nav-item.is-active span,
.nav-item:hover span {
  color: white;
}

.side-card {
  margin: 28px 8px 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff8f5, #fffefe);
}

.side-card strong {
  display: block;
  margin-bottom: 8px;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.side-actions {
  display: grid;
  gap: 8px;
  margin: 0 8px;
}

.text-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: white;
  font-weight: 800;
}

.text-button.danger {
  color: #a75550;
}

.main-panel {
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.today-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 20px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.line-button,
.home-link {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
}

.line-button {
  color: white;
  background: #39bd42;
}

.home-link {
  border: 1px solid var(--border);
  color: var(--accent-strong);
  background: white;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: viewIn 260ms ease;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.summary-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.summary-card {
  display: grid;
  gap: 12px;
  min-height: 158px;
  padding: 20px;
}

.summary-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: #fff0ed;
  font-size: 22px;
}

.summary-card strong {
  font-size: 16px;
}

.summary-card b {
  color: var(--accent-strong);
  font-size: 30px;
}

.summary-card small {
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-grid,
.workspace-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  align-items: start;
}

.workspace-grid {
  grid-template-columns: 360px 1fr;
}

.wide-panel {
  grid-column: span 1;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mini-link {
  color: var(--accent-strong);
  background: transparent;
  font-weight: 800;
}

.lesson-list,
.payment-list,
.notice-list,
.task-list,
.record-list,
.student-list {
  display: grid;
  gap: 10px;
}

.list-row,
.notice-row,
.task-row,
.student-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #f4dcd6;
  border-radius: var(--radius);
  background: #fffdfa;
}

.date-block {
  display: grid;
  place-items: center;
  min-width: 64px;
  min-height: 62px;
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: #fff0ed;
  font-weight: 900;
}

.date-block small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.row-title {
  margin: 0 0 5px;
  font-weight: 900;
}

.row-meta,
.row-body {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.badge,
.paid-toggle,
.delete-button {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  font-size: 12px;
  font-weight: 900;
}

.badge {
  color: var(--accent-strong);
  background: #fff0ed;
}

.badge.green,
.paid-toggle.is-paid {
  color: var(--green);
  background: #eaf7ee;
}

.badge.yellow {
  color: #bd7a12;
  background: #fff5de;
}

.paid-toggle {
  cursor: pointer;
  color: #c75f6d;
  background: #fff0ed;
}

.delete-button {
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.form-panel {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #744941;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  outline: none;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(233, 127, 141, 0.14);
}

.primary-action {
  display: inline-grid;
  place-items: center;
  padding: 0 22px;
  border: 0;
  min-height: 48px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #e98794, #df6d7d);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(223, 109, 125, 0.2);
}

.compact .list-row,
.compact .notice-row {
  padding: 12px;
}

.task-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #d9c0ba;
  border-radius: 50%;
  color: transparent;
  background: white;
  cursor: pointer;
}

.task-check.is-done {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: var(--radius);
  color: white;
  background: rgba(111, 64, 56, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .public-header,
  .public-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .public-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .form-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .public-shell {
    padding: 14px 16px 44px;
  }

  .public-header {
    position: static;
  }

  .public-header .line-button {
    width: 100%;
  }

  .hero-copy {
    min-height: auto;
    padding: 24px;
    background:
      linear-gradient(180deg, rgba(255, 253, 251, 0.95), rgba(255, 253, 251, 0.88)),
      url("./assets/hero-piano.png") center bottom / 100% auto no-repeat;
    padding-bottom: 190px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .main-panel,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .side-nav,
  .summary-grid,
  .dashboard-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .line-button,
  .home-link {
    width: 100%;
  }

  .list-row,
  .notice-row,
  .task-row,
  .student-row {
    grid-template-columns: 1fr;
  }

  .date-block {
    justify-items: start;
    place-items: center start;
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
  }
}
