@import url("https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&family=Yuji+Syuku&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  color-scheme: light;
  --paper: #f6ead1;
  --paper-deep: #e6c995;
  --paper-soft: #fbf4e6;
  --ink: #211b14;
  --soil: #665037;
  --line: #b99661;
  --line-soft: rgba(142, 106, 57, 0.35);
  --moss: #50633b;
  --moss-dark: #334227;
  --vermilion: #c56533;
  --cream: #fffaf0;
  --muted: #7b684f;
  --shadow: rgba(51, 38, 23, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 14% 8%, rgba(197, 101, 51, 0.12), transparent 24rem),
    radial-gradient(circle at 88% 20%, rgba(80, 99, 59, 0.12), transparent 19rem),
    linear-gradient(145deg, #d9c4a0, #f8ecd4 45%, #d2b88a);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
  margin: 0;
  min-height: 100%;
}

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

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.app-shell {
  background:
    repeating-linear-gradient(0deg, transparent 0 14px, rgba(103, 78, 44, 0.025) 14px 15px),
    radial-gradient(circle at 25% 76%, rgba(117, 91, 53, 0.12), transparent 18rem),
    var(--paper);
  box-shadow: 0 24px 70px rgba(39, 28, 18, 0.26);
  margin: 0 auto;
  max-width: 520px;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.app-shell::before,
.app-shell::after {
  color: rgba(111, 83, 47, 0.18);
  content: "きのこ";
  font-family: "Yuji Syuku", serif;
  font-size: 5rem;
  pointer-events: none;
  position: absolute;
  rotate: -11deg;
}

.app-shell::before {
  left: -1.6rem;
  top: 28rem;
}

.app-shell::after {
  bottom: 5rem;
  right: -1.4rem;
  rotate: 9deg;
}

.view {
  display: none;
  min-height: 100vh;
  padding: 18px 18px 28px;
  position: relative;
  z-index: 1;
}

.view.is-active {
  display: block;
}

.app-header {
  background: rgba(251, 244, 230, 0.88);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 8;
}

.install-guide {
  align-items: center;
  background: rgba(255, 250, 240, 0.97);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(51, 35, 18, 0.2);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 12px 14px 0;
  padding: 12px 14px;
  position: relative;
  z-index: 7;
}

.install-guide-copy {
  min-width: 0;
}

.install-guide-copy strong {
  color: var(--moss-dark);
  display: block;
  font-family: "Yuji Syuku", serif;
  font-size: 1.05rem;
}

.install-guide-copy p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 3px 0 0;
}

.install-guide-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.install-guide-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 6px 0;
}

.brand-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  display: inline-flex;
  font-family: "Yuji Syuku", serif;
  font-size: 1.2rem;
  gap: 10px;
  padding: 0;
}

.brand-button img {
  aspect-ratio: 1;
  border-radius: 12px;
  box-shadow: 0 2px 7px rgba(51, 35, 18, 0.18);
  width: 38px;
}

.hero {
  display: grid;
  gap: 16px;
}

.top-strip,
.page-top,
.library-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.label-chip {
  align-items: center;
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--soil);
  display: inline-flex;
  font-weight: 700;
  gap: 6px;
  padding: 8px 13px;
  white-space: nowrap;
}

.chip-button {
  cursor: pointer;
}

.stamp-button {
  background: var(--vermilion);
  border: 2px solid rgba(255, 250, 240, 0.5);
  border-radius: 999px;
  box-shadow: 0 5px 0 rgba(70, 43, 22, 0.24);
  color: #fffaf0;
  font-family: "Yuji Syuku", serif;
  font-size: 1.25rem;
  height: 74px;
  width: 74px;
}

.menu-stamp {
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.search-panel {
  background: rgba(255, 250, 240, 0.62);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.search-panel label {
  color: var(--soil);
  font-weight: 700;
}

.search-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
}

.hero-stage {
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  box-shadow: 0 8px 24px rgba(51, 35, 18, 0.13);
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.hero-stage::after {
  background: radial-gradient(circle at center, rgba(246, 234, 209, 0.52), rgba(246, 234, 209, 0.18) 42%, transparent 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.hero-art {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.title-block {
  left: 50%;
  padding: 0 1rem;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -43%);
  width: min(78%, 340px);
  z-index: 1;
}

h1,
.detail-header h1 {
  color: var(--ink);
  font-family: "Yuji Syuku", "Hiragino Mincho ProN", serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0;
}

.title-block h1 {
  display: grid;
  font-size: clamp(2.8rem, 13vw, 4rem);
  gap: 0.06em;
  text-shadow:
    0 2px 0 rgba(255, 250, 240, 0.72),
    0 0 12px rgba(255, 250, 240, 0.78);
}

.title-block h1 span {
  display: block;
  white-space: nowrap;
}

.title-block p,
.register-intro p,
.settings-card p {
  color: var(--soil);
  font-weight: 700;
  margin: 10px 0 0;
}

.title-block p {
  background: rgba(45, 33, 19, 0.46);
  border: 1px solid rgba(255, 250, 240, 0.48);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(45, 33, 19, 0.18);
  color: #fffaf0;
  display: inline-block;
  padding: 0.35rem 0.75rem;
  text-shadow: 0 1px 2px rgba(33, 27, 20, 0.85);
}

.camera-button {
  align-items: center;
  background: var(--moss);
  border: 1px solid rgba(255, 250, 240, 0.36);
  border-radius: 24px;
  box-shadow: inset 0 0 0 2px rgba(255, 250, 240, 0.18), 0 7px 0 rgba(51, 35, 18, 0.22);
  color: var(--cream);
  display: flex;
  font-size: 1.18rem;
  font-weight: 700;
  gap: 12px;
  justify-content: center;
  padding: 18px;
  width: 100%;
}

.camera-button.compact {
  margin-top: 14px;
  padding: 15px;
}

.camera-button:active,
.stamp-button:active {
  transform: translateY(3px);
}

.camera-line-icon {
  border: 3px solid currentColor;
  border-radius: 8px;
  display: inline-block;
  height: 30px;
  position: relative;
  width: 40px;
}

.camera-line-icon::before {
  border: 3px solid currentColor;
  border-radius: 999px;
  content: "";
  height: 12px;
  left: 10px;
  position: absolute;
  top: 6px;
  width: 12px;
}

.camera-line-icon::after {
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  content: "";
  height: 7px;
  left: 6px;
  position: absolute;
  top: -10px;
  width: 16px;
}

.library-head {
  margin: 24px 0 12px;
}

.library-head h2,
.settings-card h2 {
  font-size: 1.15rem;
  margin: 0;
}

.library-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.text-button,
.back-button,
.small-action {
  background: rgba(255, 250, 240, 0.68);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--soil);
  font-weight: 700;
  padding: 9px 13px;
}

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

.mushroom-tile {
  aspect-ratio: 0.84;
  background: rgba(255, 250, 240, 0.58);
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  box-shadow: 0 3px 0 rgba(73, 50, 27, 0.1);
  color: var(--ink);
  display: grid;
  grid-template-rows: 1fr auto auto;
  min-width: 0;
  overflow: hidden;
  padding: 7px;
  text-align: center;
}

.mushroom-tile.add-tile {
  border-style: dashed;
}

.mushroom-tile.is-sortable {
  touch-action: manipulation;
}

.mushroom-tile.is-swapping {
  border-color: var(--vermilion);
  box-shadow: 0 0 0 3px rgba(197, 101, 51, 0.2), 0 3px 0 rgba(73, 50, 27, 0.1);
}

.tile-photo {
  background: rgba(167, 132, 82, 0.2);
  border-radius: 11px;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
}

.tile-photo img,
.record-photo {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  width: 100%;
}

.empty-shape {
  background: rgba(90, 71, 49, 0.16);
  border-radius: 52% 48% 44% 56%;
  height: 42%;
  width: 62%;
}

.plus-mark {
  align-items: center;
  background: var(--moss);
  border-radius: 999px;
  color: var(--cream);
  display: inline-flex;
  font-size: 2rem;
  height: 48px;
  justify-content: center;
  line-height: 1;
  width: 48px;
}

.tile-name {
  font-size: 0.95rem;
  font-weight: 700;
  overflow: hidden;
  padding-top: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-sub {
  color: var(--muted);
  font-size: 0.78rem;
  min-height: 1.2em;
}

.empty-message {
  background: rgba(255, 250, 240, 0.52);
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--soil);
  grid-column: 1 / -1;
  padding: 18px;
  text-align: center;
}

.page-top {
  margin-bottom: 16px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.register-intro,
.detail-header {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 104px 1fr;
  margin-bottom: 14px;
}

.register-intro h1,
.detail-header h1 {
  font-size: clamp(2.1rem, 10vw, 3.4rem);
}

.round-mascot {
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(51, 35, 18, 0.15);
  object-fit: cover;
  object-position: center center;
  overflow: hidden;
  width: 100%;
}

.captured-card {
  background: rgba(255, 250, 240, 0.54);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

.photo-stack {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  padding: 10px;
}

.photo-stack img,
.no-photo-preview {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  overflow: hidden;
  width: 100%;
}

.no-photo-preview {
  align-items: center;
  background: rgba(167, 132, 82, 0.2);
  color: var(--soil);
  display: flex;
  font-weight: 700;
  justify-content: center;
}

.photo-meta {
  background: rgba(255, 250, 240, 0.8);
  border-top: 1px solid var(--line-soft);
  color: var(--soil);
  font-weight: 700;
  padding: 8px 12px;
}

.form-card,
.settings-card {
  background: rgba(255, 250, 240, 0.56);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: 0 3px 0 rgba(73, 50, 27, 0.08);
  padding: 14px;
}

.mode-picker {
  border: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 12px;
  padding: 0;
}

.mode-picker legend {
  color: var(--soil);
  font-weight: 700;
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.mode-option {
  align-items: center;
  background: rgba(255, 250, 240, 0.7);
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  color: var(--soil);
  display: flex;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  padding: 12px 9px;
  text-align: center;
}

.mode-option.is-selected {
  background: var(--vermilion);
  color: var(--cream);
}

.mode-option input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.field-group {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.field-group label {
  color: var(--soil);
  font-weight: 700;
}

.field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.field-grid .field-group:first-child,
.field-group textarea {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--ink);
  outline-color: var(--moss);
  padding: 11px 12px;
  width: 100%;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.suggestion-pill {
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--soil);
  font-weight: 700;
  padding: 7px 10px;
}

.is-hidden {
  display: none;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.records-list {
  display: grid;
  gap: 12px;
}

.record-card {
  background: rgba(255, 250, 240, 0.58);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: 96px 1fr;
  padding: 12px;
}

.record-photos {
  display: grid;
  gap: 8px;
}

.record-photo-wrap {
  display: grid;
  gap: 6px;
}

.record-photo {
  aspect-ratio: 1;
  border-radius: 13px;
}

.record-photo-empty {
  align-items: center;
  aspect-ratio: 1;
  background: rgba(167, 132, 82, 0.2);
  border-radius: 13px;
  color: var(--soil);
  display: flex;
  font-size: 0.85rem;
  font-weight: 700;
  justify-content: center;
  text-align: center;
}

.record-body dl {
  display: grid;
  gap: 5px 9px;
  grid-template-columns: auto 1fr;
  margin: 0 0 10px;
}

.record-body dt {
  color: var(--soil);
  font-weight: 700;
}

.record-body dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.photo-mini-action,
.photo-delete-action {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 8px;
}

.photo-mini-action {
  background: rgba(255, 250, 240, 0.76);
  color: var(--soil);
}

.photo-mini-action:first-of-type {
  min-width: 0;
}

.photo-delete-action,
.danger-action {
  background: rgba(197, 76, 51, 0.1);
  color: #8b2f20;
}

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

.photo-mini-action.is-current {
  background: var(--moss);
  color: var(--cream);
}

.settings-card {
  margin-top: 14px;
}

.inline-action {
  justify-self: start;
  padding: 7px 11px;
}

.full-action {
  margin-top: 12px;
  width: 100%;
}

.source-sheet {
  align-items: flex-end;
  background: rgba(33, 27, 20, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.source-sheet.is-hidden {
  display: none;
}

.source-panel {
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(33, 27, 20, 0.28);
  display: grid;
  gap: 10px;
  max-width: 420px;
  padding: 16px;
  width: 100%;
}

.menu-panel {
  align-content: start;
  gap: 9px;
}

.menu-section {
  border-top: 1px dashed var(--line-soft);
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
}

.menu-section h3 {
  color: var(--soil);
  font-size: 0.95rem;
  margin: 0;
}

.menu-row {
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  color: var(--soil);
  font-weight: 700;
  padding: 13px 14px;
  text-align: left;
}

.menu-row.is-current {
  background: var(--moss);
  color: var(--cream);
}

.source-panel h2 {
  font-family: "Yuji Syuku", serif;
  font-size: 1.45rem;
  font-weight: 400;
  margin: 0 0 2px;
  text-align: center;
}

.source-option,
.source-cancel {
  border-radius: 16px;
  font-weight: 700;
  padding: 14px;
}

.source-option {
  background: var(--moss);
  border: 1px solid rgba(255, 250, 240, 0.36);
  color: var(--cream);
}

.source-cancel {
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid var(--line-soft);
  color: var(--soil);
}

.page-card {
  background: rgba(255, 250, 240, 0.58);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: 0 3px 0 rgba(73, 50, 27, 0.08);
  padding: 16px;
}

.page-card h1 {
  font-size: clamp(2rem, 9vw, 3rem);
  margin-bottom: 10px;
}

.page-card p {
  color: var(--soil);
  font-weight: 700;
  margin: 0;
}

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

.girl-preview-grid img {
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  object-fit: cover;
  width: 100%;
}

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

.girl-card-button {
  background: rgba(255, 250, 240, 0.68);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  color: var(--ink);
  display: grid;
  gap: 7px;
  padding: 9px;
  text-align: left;
}

.girl-card-button:disabled {
  color: var(--muted);
  cursor: default;
}

.girl-card-image {
  align-items: center;
  aspect-ratio: 1;
  background: rgba(167, 132, 82, 0.2);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.girl-card-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.locked-mark {
  color: rgba(102, 80, 55, 0.5);
  font-family: "Yuji Syuku", serif;
  font-size: 3rem;
}

.girl-card-name {
  font-weight: 700;
}

.girl-card-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.rarity-stars {
  align-items: center;
  display: inline-flex;
  gap: 2px;
  line-height: 1;
  white-space: nowrap;
}

.rarity-stars.is-compact {
  margin-top: -1px;
}

.rarity-label {
  color: var(--soil);
  font-size: 0.74rem;
  font-weight: 700;
  margin-right: 3px;
}

.rarity-star {
  color: rgba(128, 102, 68, 0.25);
  font-size: 0.92rem;
  text-shadow: 0 1px 0 rgba(255, 250, 240, 0.8);
}

.rarity-star.is-filled {
  color: #d9a023;
  text-shadow: 0 1px 0 rgba(255, 250, 240, 0.9), 0 0 8px rgba(247, 211, 107, 0.55);
}

.unlock-overlay {
  align-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 250, 240, 0.28), transparent 38%),
    radial-gradient(circle at 20% 20%, rgba(247, 211, 107, 0.45), transparent 18%),
    radial-gradient(circle at 82% 28%, rgba(197, 101, 51, 0.38), transparent 20%),
    rgba(33, 27, 20, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 30;
}

.unlock-overlay.is-hidden {
  display: none;
}

.unlock-overlay::before {
  animation: sparkleSpin 7s linear infinite;
  color: rgba(255, 250, 240, 0.86);
  content: "★  ✦  ✧  ★  ✦  ✧  ★";
  font-size: 2rem;
  inset: 8% 0 auto;
  letter-spacing: 0.7rem;
  pointer-events: none;
  position: absolute;
  text-align: center;
  text-shadow: 0 0 18px rgba(247, 211, 107, 0.95);
}

.unlock-card {
  animation: cardReveal 0.9s cubic-bezier(0.2, 1.5, 0.22, 1) both;
  background:
    radial-gradient(circle at 50% 0%, rgba(247, 211, 107, 0.35), transparent 45%),
    repeating-linear-gradient(135deg, rgba(247, 211, 107, 0.12) 0 8px, transparent 8px 18px),
    var(--paper-soft);
  border: 2px solid rgba(247, 211, 107, 0.8);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  max-width: 380px;
  padding: 16px;
  position: relative;
  text-align: center;
  width: 100%;
}

.unlock-card::before,
.unlock-card::after {
  color: #f7d36b;
  content: "★";
  font-size: 2.3rem;
  position: absolute;
  top: 18px;
  text-shadow: 0 0 14px rgba(247, 211, 107, 0.9);
}

.unlock-card::before {
  left: 20px;
}

.unlock-card::after {
  right: 20px;
}

.unlock-kicker {
  color: var(--vermilion);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 8px 0 10px;
}

.unlock-card img {
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  object-fit: cover;
  width: min(78vw, 270px);
}

.unlock-card h2 {
  color: var(--vermilion);
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 10px 0 4px;
}

.unlock-card p {
  color: var(--soil);
  font-weight: 700;
}

#unlockText {
  display: grid;
  gap: 8px;
  justify-items: center;
}

#unlockText .rarity-stars {
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid rgba(217, 160, 35, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
}

.girl-detail-card {
  background: rgba(255, 250, 240, 0.58);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: 0 3px 0 rgba(73, 50, 27, 0.08);
  overflow: hidden;
}

.girl-hero-image {
  aspect-ratio: 3 / 2;
  display: block;
  object-fit: cover;
  width: 100%;
}

.girl-detail-title,
.girl-article {
  padding: 16px;
}

.girl-detail-title h1 {
  color: var(--vermilion);
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
  font-size: clamp(2.2rem, 10vw, 3.4rem);
  font-weight: 700;
}

.girl-detail-title p,
.girl-article p {
  color: var(--soil);
  font-weight: 700;
  line-height: 1.7;
  margin: 8px 0 0;
}

.girl-meta {
  background: rgba(255, 250, 240, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 10px;
}

.girl-profile {
  background: rgba(255, 250, 240, 0.48);
  border: 1px dashed var(--line-soft);
  border-radius: 16px;
  margin-bottom: 12px;
  padding: 12px;
}

.girl-profile p {
  margin: 4px 0;
}

.girl-meta p {
  margin: 4px 0;
}

.girl-meta-rarity {
  align-items: center;
  display: flex;
}

.girl-gallery {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.girl-gallery img {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  display: block;
  width: 100%;
}

.girl-article-section {
  border-top: 1px dashed var(--line-soft);
  margin-top: 16px;
  padding-top: 14px;
}

.girl-article-section h2 {
  font-size: 1.15rem;
  margin: 0;
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.74) rotate(-6deg);
  }
  62% {
    opacity: 1;
    transform: translateY(-4px) scale(1.04) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes sparkleSpin {
  from {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(12px) rotate(2deg);
  }
  to {
    transform: translateY(0) rotate(-2deg);
  }
}

.help-guide {
  display: grid;
  gap: 0;
}

.help-intro {
  padding: 10px 2px 26px;
}

.help-intro h1 {
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: clamp(1.8rem, 7.5vw, 2.45rem);
  line-height: 1.25;
  margin: 6px 0 10px;
}

.help-intro > p:not(.help-kicker) {
  color: var(--soil);
  font-size: 0.96rem;
  line-height: 1.7;
  margin: 0 0 18px;
}

.help-kicker {
  color: var(--vermilion);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
}

.help-overview-image,
.help-step-image {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: block;
  height: auto;
  width: 100%;
}

.help-section-title {
  align-items: end;
  border-bottom: 2px solid var(--moss);
  display: flex;
  justify-content: space-between;
  padding: 18px 2px 8px;
}

.help-section-title span {
  color: var(--vermilion);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.help-section-title h2 {
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 1.45rem;
  margin: 0;
}

.help-step {
  border-bottom: 1px dashed var(--line);
  display: grid;
  gap: 14px;
  padding: 28px 2px;
}

.help-step-heading {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
}

.help-step-number {
  background: var(--vermilion);
  border-radius: 999px;
  color: var(--cream);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 7px 10px;
  white-space: nowrap;
}

.help-step h2 {
  font-size: 1.13rem;
  line-height: 1.35;
  margin: 0;
}

.help-step > p {
  font-size: 0.94rem;
  line-height: 1.75;
  margin: 0;
}

.help-step-image.is-portrait {
  margin-inline: auto;
  max-width: 390px;
}

.help-step-image.is-poster {
  margin-inline: auto;
  max-width: 430px;
}

.help-notes {
  background: rgba(255, 250, 240, 0.72);
  border-left: 4px solid var(--line);
  display: grid;
  font-size: 0.86rem;
  gap: 9px;
  line-height: 1.6;
  list-style: none;
  margin: 0;
  padding: 13px 14px;
}

.help-balloon {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--soil);
  border-radius: 6px;
  box-shadow: 0 7px 18px rgba(51, 38, 23, 0.1);
  padding: 12px 14px;
  position: relative;
}

.help-balloon::after {
  border-color: var(--cream) transparent transparent;
  border-style: solid;
  border-width: 10px 8px 0;
  bottom: -9px;
  content: "";
  left: 28px;
  position: absolute;
}

.help-balloon strong {
  color: var(--soil);
  display: block;
  font-size: 0.78rem;
  margin-bottom: 3px;
}

.help-balloon p {
  font-family: "Mochiy Pop One", "Zen Kaku Gothic New", sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.help-speaker {
  display: grid;
  justify-items: start;
}

.help-speaker .help-balloon {
  width: 100%;
}

.help-speaker-avatar {
  aspect-ratio: 1;
  display: block;
  filter: drop-shadow(0 6px 7px rgba(51, 38, 23, 0.2));
  height: auto;
  margin: 5px 0 0 7px;
  object-fit: contain;
  width: 96px;
}

.help-balloon.is-moss {
  border-left-color: var(--moss);
}

.help-balloon.is-vermilion {
  border-left-color: var(--vermilion);
}

.help-balloon.is-sky {
  border-left-color: #4789a9;
}

.help-balloon.is-naratake {
  border-left-color: #9b7a42;
}

.help-safety-note {
  background: #fff2d8;
  border: 1px solid #d8a65d;
  border-radius: 6px;
  margin-top: 24px;
  padding: 14px 15px;
}

.help-safety-note strong {
  color: #8d3e28;
}

.help-safety-note p {
  font-size: 0.86rem;
  line-height: 1.65;
  margin: 5px 0 0;
}

.toast {
  animation: pop 2.4s ease forwards;
  background: var(--vermilion);
  border: 2px solid rgba(255, 250, 240, 0.5);
  border-radius: 999px;
  bottom: 20px;
  box-shadow: 0 10px 24px rgba(51, 35, 18, 0.28);
  color: var(--cream);
  font-family: "Yuji Syuku", serif;
  font-size: 1.4rem;
  left: 50%;
  padding: 12px 18px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 10;
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.8);
  }
  16%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.96);
  }
}

@media (max-width: 430px) {
  .view {
    padding: 14px 14px 24px;
  }

  .title-block {
    width: min(82%, 300px);
  }

  .title-block h1 {
    font-size: clamp(2.35rem, 11.5vw, 3.5rem);
  }

  .title-block p {
    font-size: 0.95rem;
  }

  .mode-picker,
  .register-intro,
  .detail-header,
  .record-card {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .record-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .round-mascot {
    max-width: 112px;
  }
}
