:root { color-scheme: light; --ink: #243d37; --muted: #63736b; --green: #285f50; --blue: #426a87; --red: #ae5148; --line: #dde4df; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; background: #fafbf9; color: var(--ink); font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 20px; line-height: 1.6; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 4px solid #c48219; outline-offset: 4px; }
[hidden] { display: none !important; }
.sound-app { width: min(100%, 560px); min-height: 100vh; min-height: 100svh; margin: auto; display: flex; flex-direction: column; padding: max(18px, env(safe-area-inset-top)) 24px max(12px, env(safe-area-inset-bottom)); container-type: inline-size; }
.sound-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; }
.brand { font-size: 27px; font-weight: 600; display: flex; align-items: baseline; gap: 12px; }
.brand-caption { font-size: 14px; font-weight: 400; color: var(--muted); }
.icon-button { width: 56px; height: 56px; flex: 0 0 56px; border: 1px solid var(--line); border-radius: 50%; background: #fff; display: inline-grid; place-items: center; }
.icon-button svg { width: 26px; height: 26px; stroke-width: 1.7; }
#settings { border-color: transparent; background: transparent; color: var(--muted); }
#sound-main { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 24px; min-width: 0; }
.context { color: var(--muted); font-size: 18px; margin: 0 0 8px; }
h1 { font-size: 30px; line-height: 1.5; margin: 0; font-weight: 600; overflow-wrap: anywhere; word-break: keep-all; max-width: 100%; }
#status { font-size: 18px; min-height: 50px; max-width: 100%; overflow-wrap: anywhere; word-break: keep-all; margin: 12px 0 24px; color: var(--muted); }
.player { display: grid; grid-template-columns: 52px minmax(0, 184px) 52px; gap: 12px; align-items: center; justify-content: center; width: 100%; margin: 0 0 10px; }
.primary-action { grid-column: 2; width: 100%; aspect-ratio: 1; min-height: 0; border-radius: 50%; border: 1px solid #225346; background: var(--green); color: white; display: grid; place-items: center; box-shadow: 0 8px 24px #244d3917; transition: background .15s ease, transform .15s ease; }
.primary-action svg { width: 68px; height: 68px; stroke-width: 1.5; }
.primary-action.recording { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 8px #ae514812; }
.primary-action:active { transform: scale(.97); }
.navigation { width: 52px; height: 64px; border: 0; background: transparent; }
.navigation svg { width: 34px; height: 34px; }
.navigation span { display: none; }
#previous { grid-column: 1; grid-row: 1; }
#next { grid-column: 3; grid-row: 1; }
#primary-label { font-size: 22px; font-weight: 500; margin: 14px 0 0; word-break: keep-all; overflow-wrap: anywhere; }
.position { min-height: 28px; color: var(--muted); margin: 10px 0 14px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 16px; }
.position b { width: 7px; height: 7px; border-radius: 50%; background: #d5dfd8; }
.position b.current { background: var(--green); width: 9px; height: 9px; }
.choices, .secondary-actions { width: 100%; display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 18px; min-height: 88px; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 18px 22px; text-align: left; font-size: 23px; font-weight: 700; }
.choice svg { width: 36px; height: 36px; flex-shrink: 0; color: var(--blue); }
.choice span { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.choice:nth-child(2) svg { color: var(--green); }
.choice:nth-child(3) svg { color: var(--red); }
.secondary-actions { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); margin-top: 12px; }
.secondary-action { min-width: 0; min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 2px; border: 0; background: transparent; font-size: 17px; }
.secondary-action svg { width: 52px; height: 52px; padding: 12px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--blue); stroke-width: 1.7; }
.secondary-action span { overflow-wrap: anywhere; word-break: keep-all; }
.sound-footer { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); gap: 16px; padding-top: 12px; }
.footer-button { display: flex; align-items: center; justify-content: center; gap: 9px; background: transparent; border: 0; min-height: 60px; font-size: 16px; padding: 8px 4px; }
.footer-button svg { width: 27px; height: 27px; flex-shrink: 0; stroke-width: 1.6; }
dialog { width: min(540px, calc(100% - 32px)); max-height: 90vh; border: 1px solid var(--line); border-radius: 8px; padding: 24px; color: var(--ink); background: #fff; }
dialog::backdrop { background: #12332d80; }
dialog h2 { font-size: 26px; margin: 0; }
dialog p { font-size: 18px; }
dialog input { width: 100%; min-height: 54px; margin: 6px 0 12px; border: 1px solid #81988c; padding: 8px; border-radius: 4px; }
.form-button { min-height: 54px; width: 100%; background: #edf3f0; border: 1px solid var(--line); border-radius: 4px; padding: 8px; margin: 8px 0; }
.setup-actions { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
.setup-actions a { display: block; text-align: center; color: var(--blue); padding: 14px 0; }
#usage-info { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; }
#usage-info summary { cursor: pointer; padding: 12px 0; min-height: 52px; }
#usage-info summary:focus-visible { outline: 4px solid #c48219; outline-offset: 2px; }
#usage-info h3 { font-size: 20px; margin: 20px 0 6px; }
#usage-info p { margin: 6px 0 16px; word-break: keep-all; overflow-wrap: anywhere; }
#device-management { border-top: 1px solid var(--line); margin-top: 16px; }
#device-management summary { cursor: pointer; padding: 12px 0; min-height: 56px; }
#listen-options { width: 100%; margin-top: 18px; border-top: 1px solid var(--line); text-align: left; }
#listen-options summary { cursor: pointer; min-height: 64px; padding: 14px 8px; font-size: 17px; color: var(--blue); }
#listen-actions { margin-top: 0; }
.sound-app[data-stage="records"] .player { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 360px; }
.sound-app[data-stage="records"] .primary-action { grid-column: 1 / -1; grid-row: 1; width: min(100%, 184px); justify-self: center; }
.sound-app[data-stage="records"] .navigation { width: 100%; min-height: 76px; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: 17px; font-weight: 600; }
.sound-app[data-stage="records"] .navigation svg { width: 28px; height: 28px; flex: none; }
.sound-app[data-stage="records"] .navigation span { display: inline; overflow-wrap: anywhere; word-break: keep-all; }
.sound-app[data-stage="records"] #previous { grid-column: 1; grid-row: 2; }
.sound-app[data-stage="records"] #next { grid-column: 2; grid-row: 2; }
.sound-app[data-stage="records"] .position { margin: 2px 0 6px; }
.sound-app[data-stage="records"] #status { margin-bottom: 12px; }
.sound-app[data-stage="menu"] #sound-main { align-items: stretch; text-align: left; padding-top: 20px; }
.sound-app[data-stage="menu"] h1 { font-size: 32px; font-weight: 700; line-height: 1.4; }
.sound-app[data-stage="menu"] .context { font-size: 18px; }
.sound-app[data-stage="menu"] #status { min-height: 26px; margin: 10px 0 22px; }
.sound-app[data-stage="menu"] #position, .sound-app[data-stage="menu"] #secondary { display: none; }
.choices { gap: 16px; }
.choice { min-height: 108px; padding: 22px 18px; gap: 16px; font-size: 22px; font-weight: 600; line-height: 1.5; border-color: #c7d6ce; background: #f0f6f2; box-shadow: 0 2px 0 #dce6df; }
.choice svg { width: 48px; height: 48px; padding: 10px; border-radius: 50%; background: #fff; color: #285f50; stroke-width: 2; }
.choice[data-kind="records"] { background: #f1f5fa; border-color: #cbd5e2; box-shadow: 0 2px 0 #dfe6ef; }
.choice[data-kind="records"] svg { color: #365e87; }
.choice[data-kind="send"] { background: #fbf2f0; border-color: #e2ccc7; box-shadow: 0 2px 0 #efdfda; }
.choice[data-kind="send"] svg { color: #984c40; }
button { transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease; }
button.touched, button:active { transform: scale(.97); box-shadow: inset 0 0 0 3px #345c4e; }
.choice.touched, .choice:active { background: #d7e8de; }
.choice[data-kind="records"].touched { background: #d9e6f4; }
.choice[data-kind="send"].touched { background: #f2dad4; }
.choices[aria-busy="true"] { opacity: .7; }
.choices[aria-busy="true"] button { cursor: progress; }
.sound-footer { margin-top: 20px; }
@media (min-width: 700px) { .sound-app { max-width: 620px; padding: 32px 40px 20px; } .choice { min-height: 116px; font-size: 24px; } }
@media (max-width: 359px) { .choice { padding: 18px 12px; gap: 12px; font-size: 20px; } .choice svg { width: 42px; height: 42px; padding: 8px; } }
@media (max-width: 359px) { .sound-app { padding-left: 16px; padding-right: 16px; } .player { grid-template-columns: 48px minmax(0, 164px) 48px; gap: 8px; } .navigation { width: 48px; } h1 { font-size: 27px; } .footer-button { gap: 6px; padding: 4px; } }
@container (max-width: 230px) {
  .brand-caption { display: none; }
  .sound-app[data-stage="records"] .player { grid-template-columns: minmax(0, 1fr); }
  .sound-app[data-stage="records"] .primary-action { grid-column: 1; }
  .sound-app[data-stage="records"] #previous { grid-column: 1; grid-row: 2; }
  .sound-app[data-stage="records"] #next { grid-column: 1; grid-row: 3; }
  .sound-footer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 700px) { .sound-header { padding-bottom: 6px; } #status { min-height: 32px; margin-bottom: 16px; } #sound-main { padding-top: 4px; padding-bottom: 12px; } }
@media (max-height: 700px) { .sound-app[data-stage="menu"] #sound-main { padding-top: 4px; } .sound-app[data-stage="menu"] #status:empty { display: none; } .sound-app[data-stage="menu"] .choices { margin-top: 22px; gap: 12px; } .choice { min-height: 92px; padding-top: 16px; padding-bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
