@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700&display=swap");

:root {
  --ink: #1f1d1a;
  --paper: #fbf8f3;
  --sand: #f1ede6;
  --ember: #d77a4a;
  --ember-dark: #b66236;
  --sky: #3c78d8;
  --olive: #7b806a;
  --muted: #6f6a62;
  --panel: #fffdf9;
  --shadow: 0 18px 36px rgba(41, 37, 32, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 12% 10%, #fff7ec 0, #fbf8f3 40%, #f1ede6 100%);
  overflow: hidden;
}

.page {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 7vw 18px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--ember), #f59f00);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
}

.brand h1 {
  font-size: 23px;
  margin: 0;
  letter-spacing: 0.3px;
  font-family: "Gotham", "Lato", "Helvetica Neue", Arial, sans-serif;
}

.timer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
  padding: 8px 12px;
  border-radius: 16px;
}

.timer-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account {
  position: relative;
  display: flex;
  align-items: center;
}

.account-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
  cursor: pointer;
}

.account-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}

.account-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.account-sub {
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(140deg, #f59f00, #d77a4a);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

 .account-dropdown {
  pointer-events: auto;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 10px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.account-dropdown.is-open {
  display: flex;
}

.account-item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.account-item:hover {
  background: #f6f1e9;
}

.account-divider {

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #fffdf9;
  border: 1px solid #efe6dc;
  border-radius: 18px;
  box-shadow: var(--shadow);
  width: min(420px, 90vw);
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-family: "Gotham", "Lato", "Helvetica Neue", Arial, sans-serif;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}

.modal-body {
  font-size: 14px;
  color: var(--ink);
}

.modal-section {
  margin-top: 12px;
}

.modal-field {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f6f1e9;
  font-size: 13px;
  color: var(--muted);
}

.modal-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
  height: 1px;
  background: #efe6dc;
  margin: 4px 0;
}

.timer-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-sub {
  font-size: 12px;
  color: var(--muted);
}

.timer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

#timerMinutes {
  width: 64px;
  border-radius: 12px;
  border: 1px solid #e7dfd4;
  padding: 6px 8px;
  font-size: 13px;
  background: #fffdf9;
}

.timer-btn {
  padding: 8px 14px;
  background: #1f3a8a;
  color: #fff;
}

.timer-btn.is-active {
  background: #93c5fd;
  color: #111827;
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-google {
  background: #fffdf9;
  border: 1px solid #e7dfd4;
}

.btn-phone {
  background: var(--ink);
  color: #fff;
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 28px;
  padding: 0 7vw 48px;
  min-height: 0;
  align-items: stretch;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #efe6dc;
}

.sidebar.panel,
.suggestions.panel {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.sidebar h2,
.suggestions h2 {
  font-size: 16px;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.metronome {
  margin-top: 20px;
  padding: 16px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.metronome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metronome-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.metronome-bpm {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.bpm-unit {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
}

.metronome-dial {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
}

.metronome-sounds {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.metronome-sounds select {
  flex: 1;
  border-radius: 10px;
  border: 1px solid #e7dfd4;
  padding: 6px 8px;
  background: #fffdf9;
  font-size: 12px;
  color: var(--ink);
}

.metronome-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #1f3a8a;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 58, 138, 0.2);
}

.metronome-play.is-active {
  background: #93c5fd;
  color: #111827;
}

#bpmSlider {
  width: 100%;
  accent-color: #1f3a8a;
  margin-bottom: 4px;
}

.metronome-controls {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.project {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f1e9;
  margin-bottom: 12px;
}

.scroll-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
  max-height: 100%;
}

.scroll-list::-webkit-scrollbar {
  width: 6px;
}

.scroll-list::-webkit-scrollbar-thumb {
  background: rgba(31, 29, 26, 0.15);
  border-radius: 999px;
}

.scroll-list::-webkit-scrollbar-track {
  background: transparent;
}

.item-btn {
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.item-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(41, 37, 32, 0.12);
}

.item-btn:focus-visible {
  outline: 2px solid rgba(215, 122, 74, 0.4);
  outline-offset: 2px;
}

.project strong {
  display: block;
  font-size: 15px;
}

.project span {
  font-size: 13px;
  color: var(--muted);
}

.studio {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  min-height: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #efe6dc;
  padding-bottom: 16px;
}

.chat-header h2 {
  margin: 0;
  font-size: 19px;
  font-family: "Gotham", "Lato", "Helvetica Neue", Arial, sans-serif;
}

.studio-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.level-display {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.level-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.level-bar {
  position: relative;
  width: 220px;
  height: 10px;
}

.level-track {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4dabf7 0 25%, #51cf66 25% 50%, #fcc419 50% 75%, #ff922b 75% 100%);
  border: 1px solid #efe6dc;
}

.level-marker {
  position: absolute;
  top: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #1f1d1a;
  transform: translateX(-50%);
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 6px rgba(217, 72, 15, 0.2);
  animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(0.9);
  }
}

.focus-card {
  padding: 20px;
  border-radius: 18px;
  background: #fff6eb;
  border: 1px solid #f0ddcc;
}

.focus-label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 6px;
}

.focus-title {
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: "Gotham", "Lato", "Helvetica Neue", Arial, sans-serif;
}

.focus-meta {
  font-size: 13px;
  color: var(--muted);
}

.assets h3 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.asset {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
}

.asset-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f6f1e9;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
}

.asset strong {
  display: block;
  font-size: 13px;
}

.asset p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.community {
  margin-top: 24px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.community-header h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.community-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.community-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.community-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #efe6dc;
  background: #fff;
  display: grid;
  gap: 6px;
}

.community-card small {
  color: var(--muted);
  font-size: 12px;
}

.community-empty {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed #efe6dc;
  background: #f6f1e9;
  color: var(--muted);
  font-size: 13px;
}

.btn-send {
  background: var(--ember);
  color: #fff;
  padding: 12px 18px;
}

.btn-round {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.btn-round .arrow {
  font-size: 20px;
  line-height: 1;
  transform: translateX(1px);
}

.suggestion {
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(140deg, #fff7ee, #fffdf9);
  border: 1px solid #f0ddcc;
}

.suggestion h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.suggestion p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.routine {
  border-radius: 16px;
  padding: 16px;
  background: #f8f3ea;
  border: 1px dashed #ddcbb8;
  font-size: 13px;
  color: var(--muted);
}

.difficulty-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #efe6dc;
}

.account-view {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.account-view.is-active {
  display: flex;
}

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
}

.account-eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 6px;
}

#accountTitle {
  margin: 0 0 6px;
  font-size: 22px;
  font-family: "Gotham", "Lato", "Helvetica Neue", Arial, sans-serif;
}

#accountSubtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.account-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-card {
  background: #fffdf9;
  border: 1px solid #efe6dc;
  border-radius: 16px;
  padding: 16px;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.login-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.login-card {
  width: min(420px, 92vw);
  background: #fffdf9;
  border: 1px solid #efe6dc;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.login-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-family: "Gotham", "Lato", "Helvetica Neue", Arial, sans-serif;
}

.login-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.login-actions {
  display: grid;
  gap: 10px;
}

.login-provider {
  width: 100%;
}

.login-divider {
  margin: 16px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.login-form input {
  border: 1px solid #e7dfd4;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fffdf9;
}

body.is-logged-out header,
body.is-logged-out main {
  filter: grayscale(1);
  opacity: 0.35;
  pointer-events: none;
}


.account-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-family: "Gotham", "Lato", "Helvetica Neue", Arial, sans-serif;
}

.account-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.studio.is-account #studioContent {
  display: none;
}

.studio.is-account #accountContent {
  display: flex;
}

.studio.is-account .pulse {
  opacity: 0.2;
}

@media (max-width: 900px) {
  .account-page {
    grid-template-columns: 1fr;
  }
}


.difficulty-controls .btn {
  flex: 1;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.btn-outline {
  background: #fffdf9;
  border: 1px solid #e7dfd4;
  color: var(--ink);
}

.btn-quiet {
  background: #1f3a8a;
  color: #fff;
}

.tab {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #fffdf9;
  border: 1px solid #efe6dc;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #3a342e;
  white-space: pre;
  overflow-x: auto;
}

@media (max-width: 1100px) {
  main {
    grid-template-columns: 240px 1fr;
  }

  .suggestions {
    display: none;
  }
}

@media (max-width: 900px) {
  .asset-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .timer {
    width: 100%;
    justify-content: space-between;
  }

  main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .level-bar {
    width: 100%;
    max-width: 260px;
  }
}

body.timer-active header > :not(.timer),
body.timer-active .suggestions,
body.timer-active .sidebar > :not(.metronome) {
  filter: grayscale(1);
  opacity: 0.45;
}

body.timer-active .studio,
body.timer-active .metronome {
  filter: none;
  opacity: 1;
}

body.timer-active .timer {
  filter: none;
  opacity: 1;
}

body.timer-active .sidebar > :not(.metronome),
body.timer-active .suggestions {
  pointer-events: none;
}

body.timer-active .timer,
body.timer-active .metronome,
body.timer-active .studio,
body.timer-active .account {
  pointer-events: auto;
}


.footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 0 0 24px;
  font-size: 12px;
  color: #9a948c;
}

.footer-link {
  color: #9a948c;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.legal-page {
  display: none;
}
