@font-face{font-family:"Montserrat";src:url("montserrat-semibold.woff") format("woff");font-weight:600 800;font-display:swap}
@font-face{font-family:"Karla";src:url("karla-regular.woff") format("woff");font-weight:400;font-display:swap}
@font-face{font-family:"Karla";src:url("karla-bold.woff") format("woff");font-weight:700;font-display:swap}

/* Riffbeam brand tokens: the same colours and gradients as the app (RiffbeamBrand.kt, RiffbeamAppTheme.kt). */
:root{
  color-scheme:light;
  --bg:#f5fafa;--surface:#ffffff;--surface-low:#eff5f5;--surface-high:#e3e9e9;
  --text:#172022;--muted:#3d494a;--line:#becaca;--line-strong:#6d7b7c;
  --primary:#006a64;--primary-container:#b6f5ed;--on-primary-container:#002f2c;
  --selected:#c9eee8;--on-selected:#00302c;
  --action-start:#006a64;--action-end:#225da9;--on-action:#ffffff;
  --header-start:#b6f5ed;--header-end:#d3e8e3;--on-header:#002f2c;
  --error:#ba1a1a;--error-container:#ffdad6;--on-error-container:#410002;
  --success-container:#c9eee8;--on-success-container:#00302c;
  --focus:#225da9;
  --shadow:0 18px 50px rgba(0,47,44,.12);
}
@media (prefers-color-scheme:dark){
  :root{
    color-scheme:dark;
    --bg:#101416;--surface:#171d1f;--surface-low:#1c2224;--surface-high:#272d2f;
    --text:#e1e8e8;--muted:#bfcccc;--line:#3d494a;--line-strong:#899697;
    --primary:#19c7be;--primary-container:#004f4b;--on-primary-container:#b6f5ed;
    --selected:#1f4d49;--on-selected:#c4f1ea;
    --action-start:#19c7be;--action-end:#a9c8ff;--on-action:#002f2c;
    --header-start:#004f4b;--header-end:#1f4d49;--on-header:#e1e8e8;
    --error:#ffb4ab;--error-container:#93000a;--on-error-container:#ffdad6;
    --success-container:#1f4d49;--on-success-container:#c4f1ea;
    --focus:#a9c8ff;
    --shadow:0 18px 50px rgba(0,0,0,.45);
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;min-width:320px;min-height:100vh;min-height:100dvh;background:var(--bg);color:var(--text);
  font:400 16px/1.5 Karla,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;text-rendering:optimizeLegibility}
button,input,textarea{font:inherit;color:inherit}
h1,.step-title,.wordmark,.primary,.eyebrow{font-family:Montserrat,ui-sans-serif,system-ui,sans-serif}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}

.page{width:min(100%,720px);margin:0 auto;padding:max(12px,env(safe-area-inset-top)) 16px 0;display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
.topbar{display:flex;align-items:center;justify-content:space-between;min-height:56px}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;min-height:48px}
.mark{width:34px;height:29px}
.wordmark{font-size:21px;font-weight:600;letter-spacing:-.3px}
.language{min-width:48px;min-height:48px;padding:8px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface);cursor:pointer;font-weight:700}

/* One dominant gradient per screen: the header card. */
.hero{margin:8px 0 16px;padding:24px 22px;border-radius:24px;color:var(--on-header);
  background:linear-gradient(120deg,var(--header-start),var(--header-end))}
.eyebrow{margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;opacity:.85}
h1{margin:0;font-size:clamp(26px,6.4vw,36px);font-weight:600;line-height:1.15;letter-spacing:-.5px;overflow-wrap:anywhere}
.intro{margin:10px 0 0;font-size:17px}

.card{background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:20px 18px 0;box-shadow:var(--shadow)}
.step{border:0;margin:0 0 22px;padding:0;min-width:0}
.step-title{display:flex;align-items:center;gap:10px;padding:0;margin:0 0 6px;font-size:18px;font-weight:600}
.step-number{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;font-size:14px;color:var(--on-action);
  background:linear-gradient(135deg,var(--action-start),var(--action-end))}
.optional{font-family:Karla,sans-serif;font-size:14px;font-weight:400;color:var(--muted)}
.step-help{margin:0 0 12px;color:var(--muted)}

.search{position:relative}
.search svg{position:absolute;left:14px;top:50%;width:22px;height:22px;transform:translateY(-50%);fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;pointer-events:none}
input,textarea{width:100%;min-height:52px;border:1px solid var(--line-strong);border-radius:14px;background:var(--surface-low);padding:13px 14px;outline:none}
.search input{padding-left:46px}
input:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
textarea{resize:vertical;min-height:120px}

/* The list scrolls inside a bounded area with a visible scrollbar, so the form stays short on phones. */
.song-options{display:grid;gap:6px;margin-top:10px;max-height:min(420px,52vh);overflow:auto;padding:2px 6px 2px 2px;
  scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent;padding-bottom:calc(12px + 54px + max(14px,env(safe-area-inset-bottom)))}
.song-option{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;text-align:left;padding:10px 12px;
  border:1px solid var(--line);border-radius:14px;background:var(--surface);cursor:pointer;font-size:16px}
.song-option:hover{background:var(--surface-low)}
.song-option .note{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--primary-container);color:var(--on-primary-container)}
.song-option .note svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.song-option .title{flex:1;font-weight:700;overflow-wrap:anywhere}
.song-option .check{flex:none;width:24px;height:24px;border-radius:50%;border:2px solid var(--line-strong)}
.song-option[aria-selected="true"]{border-color:var(--primary);background:var(--selected);color:var(--on-selected)}
.song-option[aria-selected="true"] .check{border:0;background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat,
  linear-gradient(135deg,#006a64,#225da9)}
.song-option:disabled{cursor:default;opacity:.7}
.empty{margin:8px 2px;color:var(--muted)}

.field-meta{display:flex;justify-content:space-between;gap:12px;margin-top:6px;color:var(--muted);font-size:13px}
.field-meta small:last-child{white-space:nowrap}

/* The send action stays above the keyboard and the browser bar on phones. */
.submit-bar{position:sticky;bottom:0;margin:0 -18px;padding:12px 18px max(14px,env(safe-area-inset-bottom));
  background:linear-gradient(to bottom,transparent,var(--surface) 18px);z-index:1}
.selected{margin:0 0 8px;font-weight:700;color:var(--primary)}
.selected:empty{display:none}
.primary{width:100%;min-height:54px;padding:14px 18px;border:0;border-radius:16px;cursor:pointer;font-size:16px;font-weight:600;
  color:var(--on-action);background:linear-gradient(120deg,var(--action-start),var(--action-end))}
.primary:hover{filter:brightness(1.06)}
.primary:disabled{cursor:not-allowed;filter:grayscale(.6);opacity:.55}

.notice,.state{margin:0 0 18px;padding:14px 16px;border-radius:14px;background:var(--surface-low);border:1px solid var(--line)}
.notice[data-kind="error"]{background:var(--error-container);color:var(--on-error-container);border-color:transparent}
.notice[data-kind="success"]{background:var(--success-container);color:var(--on-success-container);border-color:transparent}
.state .song-option{margin-top:12px;justify-content:center;font-weight:700}
.form-error{margin:0 0 10px;color:var(--error);font-weight:700}
.loading{display:flex;align-items:center;gap:12px;padding:8px 0 20px;color:var(--muted)}
.spinner{width:20px;height:20px;border:2px solid var(--line);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
footer{margin:6px 0 0;padding:14px 0 18px;border-top:1px solid var(--line);color:var(--muted);font-size:13px}
.powered{margin:18px auto max(18px,env(safe-area-inset-bottom));color:var(--muted);font-size:13px}

@media (min-width:640px){
  .page{padding-left:24px;padding-right:24px}
  .hero{padding:32px 32px}
  .card{padding:28px 28px 0}
  .submit-bar{margin:0 -28px;padding-left:28px;padding-right:28px}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important}}
