:root {
  --paper: #f4fafc;
  --water: #7EC7D8;
  --deep: #1f6d86;
  --ink: #163246;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("Img/bg.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: "Zen Maru Gothic", sans-serif;
  overflow: hidden;
}

.side {
  position: fixed;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: 320px;
  display: flex;
  flex-direction: column;
}

.intro,
#category-nav {
  margin-top: 16px;
  padding: 0 0 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfd 100%);
  border: 1px solid #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 0 #c5e4ee;
}
#category-nav {
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#category-nav::before {
  content: "分類";
  display: block;
  margin-bottom: 8px;
  padding: 8px 14px;
  color: var(--paper);
  background: var(--deep);
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  letter-spacing: 0.12em;
}

.category-jump {
  display: block;
  width: calc(100% - 20px);
  margin: 0 10px;
  padding: 10px 4px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--water);
  border-radius: 0;
  box-shadow: none;
  clip-path: none;
  font: inherit;
  cursor: pointer;
}

.category-jump:hover {
  color: var(--paper);
  background: var(--deep);
  border-radius: 8px;
}

.intro::-webkit-scrollbar,
#category-nav::-webkit-scrollbar {
  display: none;
}

#category-nav {
  max-height: calc(100vh - 460px);
}
.intro {
  display: block;
  margin-top: 16px;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #e7f6fa 100%);
  border: 1px solid #ffffff;
  border-radius: 18px;
  box-shadow:
    inset 0 2px 0 #ffffff,
    0 8px 0 #c5e4ee;
  cursor: default;
}

.intro h2 {
  margin: 0;
  padding: 8px 14px;
  color: var(--paper);
  background: var(--deep);
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  letter-spacing: 0.12em;
}

.intro p {
  margin: 0;
  padding: 14px;
}

.filter-button {
  display: none;
  width: auto;
  margin-top: 0;
  padding: 10px 16px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f3fbfd 48%, #d7eef5 100%);
  border: 2px solid #ffffff;
  border-radius: 16px;
  box-shadow:
    inset 0 2px 0 #ffffff,
    0 4px 0 #c5e4ee;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.category-jump:hover,
.filter-button:hover,
.sound-button:hover {
  color: var(--paper);
  background: var(--deep);
}

.student-card {
  display: block;
  width: 320px;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfd 100%);
  border: 1px solid #ffffff;
  border-radius: 18px;
  box-shadow:
    0 0 0 4px rgb(126 199 216 / 55%),
    6px 8px 0 rgb(31 109 134 / 18%);
  cursor: default;
}
.student-card__head {
  margin: 0 0 10px;
  color: var(--deep);
  font-family: "Shippori Mincho", serif;
  text-align: center;
}

.student-card__body {
  display: flex;
  gap: 12px;
}

.student-card__photo {
  width: 110px;
  height: 150px;
  flex: 0 0 120px;
  border-radius: 8px;
  object-fit: cover;
  background: #163246;
}
.student-card__label {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--deep);
}
.id-card__label {
  margin: 0;
  padding: 8px 14px;
  color: var(--paper);
  background: var(--deep);
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-shadow: none;
}
.student-card__name {
  margin: 0;
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
}

.student-card__date {
  margin: 4px 0 0;
  color: var(--deep);
  font-size: 14px;
}

.student-card__row {
  margin: 6px 0 0;
  font-size: 14px;
}

.student-card__row span {
  margin-right: 8px;
  color: var(--deep);
  font-size: 12px;
}
.student-card__body {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
}
#search-slot {
  position: fixed;
  top: 0;
  left: 344px;
  right: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 28px 120px 16px 16px;
  background: transparent;
}

.top-search {
  flex: 1;
  width: auto;
  padding: 10px 16px;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 88%, white);
  border: 1px solid var(--water);
  border-radius: 999px;
  font: inherit;
}

.filter-panel {
  position: absolute;
  top: 68px;
  right: 120px;
  z-index: 5;
  width: 220px;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--water);
  border-radius: 12px;
}

.filter-panel[hidden] {
  display: none;
}

.filter-panel label {
  display: block;
  margin: 6px 0;
}

.submit-button {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 5;
  padding: 10px 18px;
  color: var(--paper);
  background: var(--deep);
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.submit-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 80%);
}

.submit-panel[hidden] {
  display: none;
}

.submit-form {
  width: min(760px, calc(100% - 48px));
  max-height: calc(100% - 48px);
  overflow: auto;
  padding: 28px;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fcfe 0%, #e7f5f8 100%);
  border-radius: 22px;
}

.submit-form h2,
.submit-form p {
  margin: 0 0 12px;
}

.submit-form label {
  display: block;
  margin: 10px 0;
  color: var(--deep);
  font-weight: 700;
}

.submit-form input,
.submit-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--water);
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
}

.submit-search input {
  background: #fff;
  border: 2px solid var(--deep);
}

.submit-picks {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 10px;
  background: rgb(126 199 216 / 18%);
  border-radius: 14px;
}

.time-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--water);
  border-radius: 14px;
}

.time-box[data-time="length"] {
  grid-template-columns: repeat(3, 1fr);
}

.time-box legend {
  padding: 0 6px;
  color: var(--deep);
  font-weight: 700;
}

.time-box input:disabled {
  background: #eef3f5;
}

.submit-picks button,
.submit-actions button {
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--water);
  border-radius: 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.submit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.submit-preview a {
  color: var(--deep);
}

.field-error {
  position: relative;
  margin: 8px 0 0;
  padding: 8px 12px;
  color: #8a2f2f;
  background: #fde8e8;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.field-error::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 24px;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #fde8e8;
  border-left: 6px solid transparent;
}

.submit-warning {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  color: #8a2f2f;
  background: #fde8e8;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.submit-line {
  min-height: 120px;
}

.progress-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 80%);
}

.progress-panel[hidden] {
  display: none;
}

.progress-panel section {
  width: min(420px, calc(100% - 48px));
  padding: 28px;
  color: var(--ink);
  background: #f7fcfe;
  border-radius: 22px;
  text-align: center;
}

.progress-log {
  margin-bottom: 8px;
  text-align: left;
}

.progress-log p {
  margin: 0 0 4px;
  color: #5d7380;
  font-size: 13px;
}

.progress-now {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}

.progress-done {
  color: #1f7a46;
  font-size: 24px;
}

.progress-done::before {
  content: "✓ ";
}

.progress-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.progress-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.progress-actions button {
  padding: 8px 14px;
  color: var(--paper);
  background: var(--deep);
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.button-list {
  position: fixed;
  top: 88px;
  left: 360px;
  right: 24px;
  bottom: 24px;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.button-list {
  scrollbar-width: none;
}

.button-list::-webkit-scrollbar {
  display: none;
}
.category {
  margin-bottom: 28px;
}

.category__title {
  display: inline-block;
  margin: 18px 0 16px;
  padding: 14px 18px;
  color: var(--ink);
  background:
    linear-gradient(160deg, rgb(255 255 255 / 75%), rgb(126 199 216 / 35%) 42%, rgb(255 255 255 / 20%));
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 8px;
  box-shadow:
    8px 8px 0 rgb(31 109 134 / 28%),
    inset 0 0 12px rgb(255 255 255 / 70%);
  font-family: "Shippori Mincho", serif;
  font-size: 22px;
  line-height: 1;
}

.category__title::after {
  content: none;
}

.category__buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sound-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f3fbfd 48%, #d7eef5 100%);
  border: 2px solid #ffffff;
  border-radius: 22px;
  box-shadow:
    inset 0 2px 0 #ffffff,
    inset 0 -10px 14px rgb(126 199 216 / 28%),
    0 8px 0 #c5e4ee,
    0 12px 16px rgb(31 109 134 / 16%);
  font: inherit;
  font-size: 18px;
  text-align: left;
  cursor: pointer;
}

.sound-button__icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 12px;
  object-fit: contain;
  background: #163246;
}

.player-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 80%);
}

.player-layer[hidden] {
  display: none;
}

.player {
  width: min(520px, calc(100% - 48px));
  padding: 24px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 18px;
}

.player__title {
  margin: 0;
  font-family: "Shippori Mincho", serif;
  font-size: 28px;
}

.player__stage {
  height: 360px;
  margin: 16px 0;
  background: #163246;
  border-radius: 12px;
}

.player__anim {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player__line {
  margin: 0 0 16px;
}

.player__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player__controls button {
  height: 44px;
  margin: 0;
  padding: 0 16px;
  color: var(--paper);
  background: var(--deep);
  border: 0;
  border-radius: 999px;
  font: inherit;
  line-height: 44px;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.icon-button img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.volume-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(32%) sepia(18%) saturate(1804%) hue-rotate(153deg);
}

.volume-slider {
  width: 90px;
  height: 44px;
  margin: 0;
}

.player__controls [data-act="detail"] {
  margin-left: auto;
}

.volume-text {
  width: 42px;
  color: var(--deep);
  font-size: 14px;
}

.player__seek {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}

.player__seek input {
  flex: 1;
}

.player__seek span {
  color: var(--deep);
  font-size: 14px;
  white-space: nowrap;
}

.note-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 80%);
}

.note-layer[hidden] {
  display: none;
}

.note-pad {
  width: min(480px, calc(100% - 48px));
  min-height: 280px;
  margin: 0;
  padding: 28px 28px 32px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgb(126 199 216 / 45%), transparent 42%),
    linear-gradient(180deg, #f7fcfe 0%, #e7f5f8 100%);
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 22px;
  box-shadow:
    0 0 0 6px rgb(126 199 216 / 28%),
    0 18px 36px rgb(0 0 0 / 28%);
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  line-height: 1.7;
  white-space: normal;
  display: grid;
  grid-template-columns: 5em 1fr;
  column-gap: 16px;
  row-gap: 18px;
  align-items: start;
}

.note-pad__label,
.note-pad__value {
  margin: 0;
  padding: 0;
  line-height: 1.7;
}

.note-pad__label {
  color: var(--deep);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.note-pad__value {
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(126 199 216 / 45%);
}

.note-pad a {
  color: var(--deep);
  line-height: 1.7;
}
a.id-card__label,
a.intro__title {
  display: block;
  color: var(--paper);
  background: var(--deep);
  text-decoration: none;
  cursor: pointer;
}

a.intro__title {
  margin: 0;
  padding: 8px 14px;
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  letter-spacing: 0.12em;
}