:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Hiragino Sans", system-ui, sans-serif;
  color: #3f321a;
  background: #fffdf5;
  --cream: #fffdf5;
  --cream-deep: #fff8df;
  --yellow: #ffd94d;
  --yellow-dark: #d99a13;
  --yellow-soft: #fff1a8;
  --mint: #dff7e9;
  --mint-border: #b8e7cb;
  --brown: #6f5522;
  --brown-dark: #3f321a;
  --line: #eadfbf;
  --green: #275e46;
  --danger: #ac3427;
  --shadow: 0 12px 32px rgba(142, 111, 35, .11);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #fffef9, #fffaf0); }
.background-fish {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.swimming-fish {
  position: absolute;
  width: var(--size);
  color: var(--fish-color);
  opacity: .35;
  animation: fish-swim var(--duration) ease-in-out var(--delay) infinite;
}
.fish-left-upper {
  --size: 64px;
  --fish-color: #28a98a;
  --duration: 11s;
  --delay: -3s;
  top: 29%;
  right: calc(50% + 581px);
}
.fish-left-lower {
  --size: 59px;
  --fish-color: #f28c28;
  --duration: 13s;
  --delay: -7s;
  bottom: 13%;
  right: calc(50% + 585px);
}
.fish-right-upper {
  --size: 61px;
  --fish-color: #f28c28;
  --duration: 12s;
  --delay: -8s;
  top: 14%;
  left: calc(50% + 603px);
}
.fish-right-lower {
  --size: 76px;
  --fish-color: #39b36a;
  --duration: 10s;
  --delay: -4s;
  top: 49%;
  left: calc(50% + 579px);
}
@keyframes fish-swim {
  0%, 100% { transform: translate(8px, 0) rotate(-4deg) scaleX(1); }
  24% { transform: translate(-6px, -8px) rotate(3deg) scaleX(1); }
  46% { transform: translate(-18px, -2px) rotate(-3deg) scaleX(1); }
  52% { transform: translate(-18px, -2px) rotate(3deg) scaleX(-1); }
  76% { transform: translate(-3px, -10px) rotate(-4deg) scaleX(-1); }
  94% { transform: translate(8px, 0) rotate(3deg) scaleX(-1); }
}
@media (max-width: 1320px) {
  .background-fish { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .swimming-fish { animation: none; }
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.top { position: relative; z-index: 2; background: #daefe1; border-bottom: 1px solid var(--mint-border); }
main.shell { position: relative; }
.top-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top-leading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-menu { position: relative; flex: none; --menu-gold: #835b10; }
.header-menu #menu-toggle { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--menu-gold); font-weight: 700; }
.menu-toggle-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #e1c889; border-radius: 50%; background: var(--cream); font-size: 1.2rem; }
#menu-toggle:hover .menu-toggle-icon { background: var(--cream-deep); }
.header-menu nav { position: absolute; inset: calc(100% + 8px) auto auto 0; display: grid; min-width: 170px; gap: 4px; padding: 7px; border: 1px solid var(--mint-border); border-radius: 10px; background: #edf8ef; box-shadow: var(--shadow); }
.header-menu:not(.is-open) nav { display: none; }
.header-menu a { display: flex; align-items: center; gap: 9px; padding: 10px 12px; color: var(--menu-gold); border-radius: 7px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.menu-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; font-size: 1.12rem; line-height: 1; }
.header-menu a:hover { outline: 1px solid #80b396; outline-offset: 1px; }
.header-menu a:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.header-menu [aria-current="page"] { background: var(--mint); box-shadow: inset 0 0 0 1px var(--mint-border); }
.official-menu { border-top: 1px solid var(--mint-border); margin-top: 5px; padding-top: 5px; color: var(--menu-gold); }
.official-menu summary { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 999px; font-weight: 700; cursor: pointer; list-style: none; white-space: nowrap; }
.official-menu summary::-webkit-details-marker { display: none; }
.official-menu summary:hover { background: var(--mint); }
.official-menu ul { display: grid; gap: 2px; margin: 0 0 4px; padding: 0 0 0 12px; list-style: none; }
.official-menu:not([open]) ul { display: none; }
.official-menu a { font-size: .88rem; }
.official-avatar { display: block; flex: 0 0 28px; border: 1px solid var(--mint-border); border-radius: 50%; object-fit: cover; }
.social-icon { width: 19px; height: 19px; flex: 0 0 19px; }
@media (min-width: 1000px) {
  body { padding-inline-start: 66px; }
  body:has(.header-menu.is-open) { padding-inline-start: 210px; }
  .header-menu {
    position: fixed;
    inset: 0 auto 0 0;
    width: 66px;
    padding: 12px;
    border-inline-end: 1px solid var(--mint-border);
    background: #edf8ef;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .header-menu.is-open { width: 210px; }
  .header-menu:not(.is-open) { padding-inline: 10px; }
  .header-menu nav { display: flex; flex-direction: column; position: static; min-width: 0; min-height: calc(100% - 56px); margin-top: 14px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .header-menu a { border-radius: 999px; }
  .header-menu:not(.is-open) nav { display: flex; }
  .header-menu:not(.is-open) a { justify-content: center; padding-inline: 0; }
  .header-menu:not(.is-open) :is(.menu-label, .menu-toggle-label) { display: none; }
  .official-menu { margin-top: auto; }
  .header-menu:not(.is-open) .official-menu summary { justify-content: center; padding-inline: 0; }
}
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px 14px; flex-wrap: wrap; }
.data-updated { color: var(--green); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.brand { color: var(--brown-dark); font-weight: 800; text-decoration: none; }
.brand:hover { text-decoration: underline; }
.hero {
  position: relative;
  overflow: hidden;
  margin-block: 28px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero img { display: block; width: 100%; height: auto; }
.video-gallery { padding: 20px; }
.gallery-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.gallery-count { padding: 3px 9px; border-radius: 999px; background: var(--mint); color: var(--green); font-size: .82rem; font-weight: 700; }
.gallery-filter { display: flex; align-items: center; margin-inline-start: auto; }
.gallery-tabs { width: fit-content; margin-bottom: 14px; }
.gallery-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 205px),1fr)); gap: 14px; }
.gallery-list li { position: relative; }
.gallery-list .favorite-button { position: absolute; top: 15px; right: 15px; margin: 0; }
.gallery-list a { display: grid; gap: 7px; padding: 9px; height: 100%; border: 1px solid var(--line); border-radius: 12px; color: var(--brown-dark); text-decoration: none; overflow-wrap: anywhere; }
.gallery-list a:hover strong { text-decoration: underline; }
.gallery-list a > span { font-size: .82rem; color: var(--green); }
.gallery-thumbnail { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px; background: var(--mint); color: var(--green); }
.gallery-thumbnail::before { content: "▶" / ""; grid-area: 1 / 1; font-size: 1.6rem; }
.gallery-thumbnail img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.hero-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.catalog { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: clip; margin-bottom: 32px; box-shadow: var(--shadow); }
.overview { display: flex; gap: 16px; margin-bottom: 20px; }
.overview-card { flex: 1; min-width: 0; padding: 16px 18px; border: 1px solid var(--mint-border); border-radius: 16px; background: #f3faf5; }
.overview-card + .overview-card { flex: 1.55; }
.overview-card h2 { color: var(--green); font-size: 1.05rem; margin-bottom: 10px; }
.overview-card ol, .overview-card ul { margin: 0; padding: 0; list-style: none; }
.top-song-button { display: grid; width: 100%; min-height: 40px; grid-template-columns: 1.1rem minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 4px; border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: start; font-size: .88rem; }
.top-song-button:hover { background: var(--mint); }
.top-songs li span, .recent-streams button span { overflow-wrap: anywhere; }
.top-songs progress { display: block; margin-top: 5px; width: 100%; height: 7px; border: 0; border-radius: 8px; background: #dcece1; color: #558d6b; }
.top-songs progress::-webkit-progress-bar { background: #dcece1; border-radius: 8px; }
.top-songs progress::-webkit-progress-value { background: #558d6b; border-radius: 8px; }
.top-songs progress::-moz-progress-bar { background: #558d6b; border-radius: 8px; }
.overview-rank, .overview-total, .recent-streams time { color: var(--green); font-weight: 700; white-space: nowrap; }
.recent-streams li + li { border-top: 1px dashed var(--mint-border); }
.recent-streams button { display: grid; width: 100%; min-height: 44px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 4px; border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: left; font-size: .88rem; }
.recent-streams button:hover { background: var(--mint); }
@media (max-width: 760px) {
  .overview { flex-direction: column; gap: 12px; }
  .overview-card { padding-inline: 14px; }
  .recent-streams button { grid-template-columns: 1fr auto; gap: 3px 10px; padding-block: 7px; }
  .recent-streams button span:nth-child(2) { grid-row: 2; grid-column: 1 / -1; }
}
.section-head, .filters { padding-inline: 26px; }
.section-head { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.catalog-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
h2 { font-size: 1.35rem; margin: 0; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.filters select { text-overflow: ellipsis; }
label { display: grid; gap: 7px; font-weight: 700; font-size: .9rem; }
input, select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #e1c889;
  border-radius: 8px;
  background: var(--cream);
  color: inherit;
  font-weight: 400;
}
.song-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.favorite-search { position: relative; cursor: pointer; }
.favorite-search input { position: absolute; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.favorite-search-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #e1c889; border-radius: 8px; background: var(--cream); font-size: 1.15rem; }
.favorite-search input:not(:checked) + span { filter: grayscale(1); }
.favorite-search input:checked + span { background: var(--yellow-soft); border-color: var(--yellow-dark); }
.favorite-search input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.filter-menu { margin: 12px 26px 16px; border: 1px solid var(--mint-border); border-radius: 10px; background: #f3faf5; }
.filter-menu summary { padding: 10px 12px; cursor: pointer; color: var(--green); font-weight: 700; }
.filter-menu-content { display: grid; gap: 12px; padding: 0 12px 12px; }
.filter-options { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 16px; }
.tag-filter-group > span { color: var(--green); font-size: .9rem; font-weight: 700; }
.tag-filter-group .song-tag[aria-pressed="true"] { background: var(--yellow-soft); border-color: var(--yellow-dark); color: var(--brown-dark); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 9px; background: var(--mint); }
.tabs button, .quiet, .primary, .danger { min-height: 38px; padding: 6px 12px; border: 1px solid transparent; border-radius: 7px; font-weight: 700; }
.tabs button { background: transparent; color: var(--green); }
.tabs [aria-pressed="true"] { background: var(--yellow-soft); border-color: var(--yellow-dark); color: var(--brown-dark); }
.quiet { background: var(--cream); border-color: #e1c889; color: var(--brown); }
.quiet:hover { background: var(--cream-deep); }
.primary { background: var(--yellow-soft); border-color: var(--yellow-dark); color: var(--brown-dark); }
.primary:hover { background: var(--yellow); }
.danger { background: var(--danger); color: #fff; }
#count { color: var(--brown); white-space: nowrap; }
#notice { margin: 0 26px 16px; color: var(--green); }
.song-toast {
  position: fixed;
  z-index: 10;
  inset-inline: 14px;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.song-toast p {
  margin: 0;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: song-toast-in 180ms ease-out both, song-toast-out 420ms ease-in 3s forwards;
}
@keyframes song-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes song-toast-out {
  to { opacity: 0; transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .song-toast p { animation: none; }
}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92rem; }
th, td { padding: 14px 16px; border-top: 1px solid var(--line); }
td { overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-left: 26px; }
th { position: sticky; top: 0; z-index: 1; background: var(--mint); color: var(--green); white-space: nowrap; box-shadow: 0 1px var(--line); }
td a { color: var(--green); overflow-wrap: anywhere; }
.song-name { font-weight: 700; }
.song-row { cursor: pointer; }
.song-row:hover, .song-row:focus-within { background: #f7fbf7; }
.song-detail-button { border: 0; padding: 0; background: none; color: var(--green); font: inherit; text-align: start; overflow-wrap: anywhere; }
.song-performances { color: var(--green); font-weight: 700; white-space: nowrap; }
.favorite-button.quiet {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  margin-inline-start: 7px;
  border-radius: 50%;
  color: #a83e5e;
  font-size: 1.05rem;
  line-height: 1;
  vertical-align: middle;
}
.favorite-button[aria-pressed="false"] span[aria-hidden="true"] { filter: grayscale(1); opacity: .65; }
.favorite-button[aria-pressed="true"] { background: var(--yellow-soft); border-color: var(--yellow-dark); }
.song-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 6px 0 0; list-style: none; }
.song-tags li { min-width: 0; }
.song-tag { max-width: 100%; border: 1px solid var(--mint-border); border-radius: 12px; padding: 3px 8px; font-size: .76rem; font-weight: 600; background: var(--mint); color: var(--green); overflow-wrap: anywhere; }
button.song-tag:hover { background: #c8ebd6; text-decoration: underline; }
.badge { display: inline-block; white-space: nowrap; border-radius: 99px; padding: 4px 10px; font-weight: 700; }
.badge.ready, .detail-status-card[data-status="ready"] { background: var(--mint); color: var(--green); }
.badge.challenge, .detail-status-card[data-status="challenge"] { background: #ffe2ce; color: #823d1d; }
.badge.practice, .detail-status-card[data-status="practice"] { background: var(--cream-deep); color: var(--brown); }
.song-name .song-copy-button { margin: 4px 0 0 6px; min-height: 32px; padding: 4px 8px; font-size: .78rem; }
.detail-summary .song-copy-button { min-height: 42px; font-size: .9rem; }
.row-actions { white-space: nowrap; }
.row-actions button + button { margin-left: 6px; }
.video-fields, .video-input { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.video-input { display: grid; gap: 10px; margin-bottom: 10px; }
.video-input button { justify-self: start; }
td.empty { padding: 38px 12px; text-align: center; color: var(--brown); }
dialog { width: min(450px, calc(100% - 30px)); max-height: calc(100% - 30px); padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: inherit; }
dialog::backdrop { background: #3f321a99; }
.song-detail { width: min(690px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; overflow: hidden; }
.song-detail[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.detail-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--mint-border); background: #edf8ef; }
.detail-header h2 { align-self: center; overflow-wrap: anywhere; }
.detail-close.quiet { flex: 0 0 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 1.4rem; }
.detail-body { padding: 16px 20px 20px; overflow: auto; overscroll-behavior: contain; }
.detail-artist { color: var(--brown); font-weight: 700; }
.detail-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 16px 20px; }
.detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 100%; }
.detail-summary p { display: grid; min-width: 100px; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--mint); color: var(--green); text-align: center; font-size: .8rem; }
.detail-summary strong { font-size: 1.25rem; }
.detail-favorite-button.quiet { display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; min-height: 42px; margin: 0; padding: 6px 11px; border-radius: 8px; color: var(--brown); font-size: .9rem; }
.detail-summary a { display: inline-flex; align-items: center; text-decoration: none; }
.detail-summary a:hover { text-decoration: underline; }
.detail-body h3 { margin: 0 0 8px; font-size: 1.05rem; }
.detail-videos { margin: 0; padding: 0; list-style: none; }
.detail-videos li { border-top: 1px solid var(--line); }
.detail-videos a { display: grid; grid-template-columns: minmax(85px, 26%) minmax(0, 1fr); align-items: start; gap: 12px; padding-block: 10px; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.detail-videos a > span { display: grid; gap: 3px; }
.detail-videos time, .detail-play { color: var(--green); font-size: .86rem; }
.detail-play { font-weight: 700; text-decoration: underline; }
dialog form { display: grid; gap: 16px; }
dialog p { margin: 0; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.error { color: var(--danger); }
@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .top-inner { min-height: 62px; }
  .top-leading { gap: 6px; }
  .menu-toggle-icon { width: 38px; height: 38px; }
  .menu-toggle-label { font-size: .82rem; }
  .top-actions { padding-block: 8px; }
  .brand { font-size: .87rem; }
  .top .quiet { flex-shrink: 0; font-size: .82rem; }
  .hero { margin-block: 18px; border-radius: 12px; }
  .section-head, .filters { padding-inline: 14px; }
  .section-head { min-height: 62px; }
  .filters { grid-template-columns: 1fr; gap: 10px; }
  .filter-menu { margin-inline: 14px; }
  .tabs { align-self: flex-start; }
  .tabs { flex-wrap: wrap; }
  .tabs button { padding-inline: 7px; font-size: .82rem; white-space: nowrap; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tbody tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  tbody td, tbody td:first-child { border: 0; padding: 4px 0; }
  tbody .empty:first-child { padding: 20px 0; }
  .detail-header { padding: 12px 14px; }
  .detail-body { padding: 12px 14px 16px; }
}
