:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #23312d;
  background: #f5f1e8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #23312d;
  --muted: #79827b;
  --green: #236857;
  --green-dark: #174c40;
  --paper: #fffefa;
  --peach: #f2c9ad;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 13% 10%, rgba(233, 220, 194, .48), transparent 31rem),
    radial-gradient(ellipse at 91% 84%, rgba(207, 225, 214, .48), transparent 30rem),
    #f5f1e8;
}

button, select { font: inherit; }

.app-shell {
  width: min(100% - 40px, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(45, 69, 59, .1);
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.04em;
}

.wordmark-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 9px 9px 9px 3px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
}

.privacy-note { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: #78a58c; }

.practice-card {
  width: min(100%, 590px);
  margin: auto;
  padding: 55px 62px 48px;
  background: rgba(255, 254, 250, .88);
  border: 1px solid rgba(44, 65, 54, .07);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(46, 62, 52, .08);
  text-align: center;
}

.eyebrow { display: flex; justify-content: center; gap: 10px; align-items: center; color: #87948a; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.eyebrow-line { width: 23px; height: 1px; background: #c7ab83; }
h1 { margin: 17px 0 8px; font: 600 clamp(44px, 7vw, 62px)/1.04 'Playfair Display', serif; letter-spacing: -.045em; }
.question-mark { color: #c57c51; }
.intro { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.tutor-row {
  margin: 31px 0 27px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
  border: 1px solid #eee9df;
  border-radius: 15px;
  background: #fffdfa;
}

.tutor-avatar { position: relative; width: 47px; height: 47px; display: grid; place-items: center; flex: 0 0 47px; border-radius: 16px; background: #e9f0e9; }
.avatar-face { font: 600 23px 'Playfair Display', serif; color: var(--green); }
.avatar-spark { position: absolute; top: -6px; right: -5px; color: #c57c51; font-size: 17px; }
.tutor-copy { display: flex; flex-direction: column; gap: 2px; }
.tutor-label { color: #92998f; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.tutor-copy strong { font: 600 18px 'Playfair Display', serif; }
.tutor-description { color: var(--muted); font-size: 11px; }
.italian-greeting { margin-left: auto; align-self: flex-start; color: var(--green); font: italic 17px 'Playfair Display', serif; }

.settings-row { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; text-align: left; }
.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group label { color: #727d74; font-size: 11px; font-weight: 600; }
.field-group select { width: 100%; min-width: 0; height: 42px; padding: 0 12px; color: #394840; background: #fff; border: 1px solid #e5e3db; border-radius: 10px; font-size: 12px; }
.field-group select:focus-visible, .primary-button:focus-visible { outline: 3px solid rgba(35, 104, 87, .24); outline-offset: 2px; }

.voice-panel { padding: 24px 0 19px; }
.voice-orbit { position: relative; width: 92px; height: 92px; margin: 0 auto 12px; display: grid; place-items: center; }
.mic-icon { position: relative; z-index: 2; width: 64px; height: 64px; display: grid; place-items: center; color: var(--green); background: #e5efe8; border: 1px solid rgba(35, 104, 87, .11); border-radius: 50%; transition: .25s ease; }
.mic-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.orbit { position: absolute; inset: 3px; border: 1px solid rgba(35, 104, 87, .13); border-radius: 50%; }
.orbit-two { inset: -5px; border-color: rgba(35, 104, 87, .07); }
.voice-status { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.voice-detail { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.sound-meter { width: min(100%, 220px); height: 7px; margin: 13px auto 0; overflow: hidden; background: #e9e8df; border-radius: 99px; }
.sound-meter-fill { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #78a28b, #236857); border-radius: inherit; transition: width .08s linear; }
.sound-meter-label { min-height: 13px; margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.voice-panel:not(.is-active) .sound-meter, .voice-panel:not(.is-active) .sound-meter-label { visibility: hidden; }
.voice-panel.is-active .mic-icon { color: #fff; background: var(--green); box-shadow: 0 0 0 7px rgba(35, 104, 87, .09); }
.voice-panel.is-active .orbit-one { animation: breathe 1.8s ease-out infinite; }
.voice-panel.is-active .orbit-two { animation: breathe 1.8s ease-out .6s infinite; }
@keyframes breathe { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.22); opacity: 0; } }

.primary-button { width: 100%; height: 52px; padding: 0 17px; display: flex; align-items: center; justify-content: center; gap: 10px; color: white; background: var(--green); border: 0; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .7; }
.button-icon { font-size: 15px; }
.button-arrow { margin-left: auto; font-size: 19px; font-weight: 400; }
.build-note { margin: 13px 0 0; color: #99a097; font-size: 10px; line-height: 1.5; }
.service-status { margin: 10px 0 0; color: #79827b; font-size: 10px; line-height: 1.5; }
.service-status.is-ready { color: var(--green); }

.page-footer { padding: 0 0 24px; display: flex; justify-content: space-between; color: #92998f; font-size: 10px; }
.page-footer span:first-child span { color: #bf8060; }

.access-dialog { width: min(calc(100% - 32px), 410px); padding: 0; color: var(--ink); background: transparent; border: 0; overflow: visible; }
.access-dialog::backdrop { background: rgba(32, 44, 38, .56); backdrop-filter: blur(4px); }
.access-card { padding: 30px; background: #fffdfa; border: 1px solid #eee9df; border-radius: 19px; box-shadow: 0 24px 80px rgba(23, 39, 31, .2); }
.access-card h2 { margin: 14px 0 8px; font: 600 30px/1.1 'Playfair Display', serif; }
.access-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.access-card label { display: block; margin: 20px 0 7px; color: #727d74; font-size: 11px; font-weight: 600; }
.access-card input { width: 100%; height: 46px; padding: 0 12px; color: #394840; background: #fff; border: 1px solid #e5e3db; border-radius: 10px; font: inherit; }
.access-card .primary-button { margin-top: 15px; }
.access-card .primary-button:focus-visible, .access-card input:focus-visible { outline: 3px solid rgba(35, 104, 87, .24); outline-offset: 2px; }
.access-error { min-height: 20px; margin-bottom: 0; color: #a43d31 !important; }

@media (max-width: 600px) {
  .app-shell { width: min(100% - 24px, 1080px); }
  .topbar { height: 67px; }
  .practice-card { padding: 37px 22px 31px; border-radius: 19px; }
  .tutor-row { padding: 13px; gap: 11px; }
  .tutor-description { max-width: 190px; line-height: 1.4; }
  .privacy-note { font-size: 10px; }
  .settings-row { grid-template-columns: 1fr; }
  .field-group select { height: 44px; }
}
