/* Quiet layout for discovery, personal tasks and match coordination. */
.sidebar {
  width: 200px;
  padding: 28px 16px;
}
.sidebar-caption {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 2px;
  margin: 16px 13px 30px;
}
.shell {
  margin-left: 200px;
}
.topbar {
  height: 72px;
  padding: 0 32px;
}
.topbar-actions,
.profile-shortcut {
  display: flex;
  align-items: center;
  gap: 16px;
}
.preview-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 12px;
  min-height: 44px;
}
.profile-region {
  font-size: 12px;
  color: var(--muted);
}
.mobile-brand {
  display: none;
}
.nav-count,
.count-badge {
  background: var(--lime);
  color: #192016;
  border-radius: 20px;
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.nav-count {
  margin-left: auto;
}
.count-badge.neutral {
  background: #303b32;
  color: var(--muted);
}
main {
  max-width: 1220px;
  padding: 34px 32px;
}
h1 {
  font-size: 30px;
}
h3 {
  font-size: 16px;
}
.eyebrow {
  margin-bottom: 12px;
}
.heading p {
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.quiet-link {
  font-size: 12px;
  color: var(--muted);
}
.region-context {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin: 0 0 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.region-context small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.region-context > span:last-child {
  margin-left: 25px;
}
.region-pin {
  font-size: 25px;
  color: var(--lime);
}
.discovery-controls {
  display: grid;
  grid-template-columns: 1fr 220px 170px;
  gap: 12px;
}
.discovery-controls .search {
  width: 100%;
}
.discovery-controls select {
  font-size: 12px;
}
.league-list {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.simple-league {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.simple-league:last-child {
  border-bottom: 0;
}
.simple-league:hover,
.task-row:hover,
.agenda-row:hover {
  background: #222922;
}
.league-emblem {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border: 1px solid #455537;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: #273223;
  font-weight: 700;
}
.league-emblem.amber {
  color: #e9c583;
  background: #332c21;
  border-color: #504432;
}
.league-emblem.violet {
  color: #bcb0e4;
  background: #2c283a;
  border-color: #484056;
}
.league-main {
  min-width: 0;
  flex: 1;
}
.league-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.league-title h3 {
  margin: 0;
  font-size: 16px;
}
.league-main p {
  font-size: 12px;
  margin: 7px 0;
}
.near-tag {
  font-size: 10px;
  color: var(--lime);
}
.league-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}
.row-arrow {
  color: var(--muted);
  margin-left: auto;
}
.personal-nudge {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  padding: 22px;
  margin-top: 24px;
  border-radius: 9px;
}
.personal-nudge h3 {
  font-size: 14px;
  margin-bottom: 5px;
}
.personal-nudge p {
  font-size: 12px;
}
.personal-nudge > span:last-child {
  margin-left: auto;
  font-size: 12px;
  color: var(--lime);
}
.nudge-symbol {
  font-size: 28px;
  color: var(--lime);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr);
  gap: 22px;
}
.dashboard-main,
.dashboard-aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.next-match {
  padding: 24px;
}
.section-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  color: var(--muted);
}
.section-kicker > a {
  font-size: 11px;
}
.next-date {
  font-size: 27px;
  font-weight: 650;
  margin: 28px 0;
}
.next-date span {
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
}
.next-teams {
  display: flex;
  gap: 20px;
  align-items: center;
}
.next-teams > div {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.next-teams b {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.next-teams > span {
  font-size: 12px;
  color: var(--muted);
}
.next-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 25px 0;
  font-size: 11px;
  color: var(--muted);
}
.pending-label {
  color: #e3c789;
}
.confirmed-label {
  color: var(--lime);
}
.next-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.task-row:last-child {
  border: 0;
}
.task-row > div {
  min-width: 0;
}
.task-row b {
  font-size: 13px;
}
.task-row p {
  font-size: 12px;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.task-row small {
  font-size: 10px;
  color: var(--muted);
}
.task-indicator {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid #5c6447;
  border-radius: 50%;
  color: var(--lime);
  font-size: 14px;
}
.task-indicator.waiting {
  color: var(--muted);
  border-color: var(--line);
}
.calm-empty {
  padding: 24px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.calm-empty > span {
  color: var(--lime);
  margin-right: 10px;
}
.agenda-row,
.membership-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.agenda-row > div,
.membership-row > div {
  flex: 1;
  min-width: 0;
}
.agenda-row small,
.membership-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.agenda-day {
  font-size: 12px;
  min-width: 58px;
}
.panel-bottom-link {
  display: block;
  font-size: 11px;
  color: var(--muted);
  padding: 18px 20px;
}
.small-note,
.field-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.small-note {
  padding: 0 5px;
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr);
  gap: 24px;
}
.profile-explainer {
  padding: 28px;
  align-self: start;
}
.profile-explainer .avatar {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
}
.profile-explainer h3 {
  line-height: 1.5;
}
.profile-explainer p {
  margin: 15px 0 28px;
}
.match-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.match-controls label {
  font-size: 11px;
  color: var(--muted);
}
.match-controls select {
  font-size: 12px;
  margin-left: 8px;
  max-width: 235px;
}
.coordination-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}
.appointment-date {
  font-size: 23px;
  margin: 12px 0 28px;
}
.time-fields {
  display: flex;
  gap: 12px;
}
.time-fields input {
  width: 50%;
}
.proposal {
  border: 1px solid #5b5438;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 24px;
}
.proposal small {
  color: var(--muted);
  font-size: 11px;
}
.proposal b {
  display: block;
  font-size: 18px;
  margin: 12px 0;
}
.proposal p {
  font-size: 12px;
}
.conversation {
  max-height: 420px;
  overflow: auto;
  padding: 18px;
}
.message {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
}
.message.mine {
  background: #232d21;
}
.message > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 11px;
}
.message time {
  font-size: 10px;
  color: var(--muted);
}
.message p {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
.message small {
  font-size: 10px;
  color: var(--muted);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  margin: 0 0 20px;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--lime);
}
#message-form .field-help {
  margin-top: 16px;
}
.scoreboard {
  background: var(--panel);
}
.match-controls + .back {
  display: block;
}
#phone-preview {
  padding: 0 12px 12px;
  box-sizing: border-box;
  width: max(346px, calc(var(--scaled-width) + 26px));
  margin: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 16px);
  overflow: hidden;
  border: 1px solid #334c63;
  border-radius: 20px;
  background: #101925;
  color: var(--ink);
  box-shadow: 0 24px 100px #0009;
}
#phone-preview::backdrop { background: #040a12; }
.phone-toolbar { display: flex; align-items: center; gap: 8px; height: 56px; font-size: 12px; }
.phone-toolbar select { margin-left: auto; padding: 6px; font-size: 11px; width: auto; max-width: 160px; }
.phone-toolbar button { background: transparent; border: 0; color: var(--ink); min-width: 34px; min-height: 34px; }
.phone-stage { position: relative; width: var(--scaled-width); height: var(--scaled-height); margin: auto; }
.phone-device { position: absolute; top: 0; left: 0; width: calc(var(--phone-width) + 20px); height: calc(var(--phone-height) + 20px); padding: 10px; box-sizing: border-box; background: #020305; border-radius: 54px; box-shadow: inset 0 0 0 2px #5b6470, inset 0 0 0 5px #20252c; transform: scale(var(--device-scale)); transform-origin: top left; }
.phone-screen { position: relative; width: var(--phone-width); height: var(--phone-height); border-radius: 44px; overflow: hidden; background: #071426; }
.phone-statusbar { position: absolute; z-index: 3; pointer-events: none; inset: 0 0 auto; height: var(--phone-top); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; color: #fff; font: 600 15px/1 system-ui, sans-serif; }
.phone-indicators svg { display: block; width: 70px; height: 18px; }
.phone-cutout { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); width: 158px; height: 31px; border-radius: 0 0 20px 20px; background: #020305; }
#phone-frame { position: absolute; top: 0; left: 0; display: block; width: var(--phone-width); max-width: none; height: var(--phone-height); margin: 0; border: 0; border-radius: 0; background: var(--bg); }
.phone-home { position: absolute; z-index: 3; pointer-events: none; inset: auto 0 0; height: var(--phone-bottom); display: grid; place-items: center; }
.phone-home span { width: 134px; height: 5px; border-radius: 9px; background: #fff; }
#phone-preview[data-chrome="camera"] .phone-cutout { top: 8px; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px #252a34; }
#phone-preview[data-chrome="camera"] .phone-device { border-radius: 38px; }
#phone-preview[data-chrome="camera"] .phone-screen { border-radius: 28px; }
#phone-preview[data-chrome="camera"] .phone-statusbar { font-size: 13px; }
#phone-preview[data-chrome="camera"] .phone-home span { width: 100px; height: 4px; }
@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-aside .small-note {
    grid-column: 1/-1;
  }
  .topbar-left {
    display: none;
  }
  .topbar-actions {
    margin-left: auto;
  }
  .discovery-controls {
    grid-template-columns: 1fr 180px 140px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: calc(68px + env(safe-area-inset-bottom));
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    z-index: 20;
  }
  .sidebar .logo,
  .sidebar-caption,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 3px;
  }
  .nav {
    position: relative;
    flex-direction: column;
    gap: 3px;
    padding: 4px 2px;
    margin: 0;
    font-size: 10px;
    min-height: 55px;
    justify-content: center;
  }
  .nav-icon {
    font-size: 20px;
    text-align: center;
  }
  .nav-count {
    position: absolute;
    top: 3px;
    right: 10px;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .mobile-brand {
    display: block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;
  }
  .topbar-actions {
    gap: 10px;
  }
  .profile-region {
    display: none;
  }
  .preview-toggle {
    font-size: 17px;
    padding: 7px 10px;
  }
  .preview-toggle span {
    display: none;
  }
  main {
    padding: 26px 18px calc(100px + env(safe-area-inset-bottom));
  }
  h1 {
    font-size: 27px;
  }
  .heading {
    margin-bottom: 24px;
    gap: 16px;
  }
  .heading p {
    font-size: 12px;
  }
  .region-context {
    width: 100%;
    padding: 12px;
  }
  .region-context > span:last-child {
    margin-left: auto;
  }
  .discovery-controls {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .discovery-controls .search {
    grid-column: 1/-1;
  }
  .discovery-controls select {
    width: 100%;
    font-size: 12px;
    padding: 12px 7px;
    min-height: 44px;
  }
  .simple-league {
    padding: 18px 14px;
    gap: 13px;
  }
  .league-emblem {
    width: 40px;
    height: 40px;
    font-size: 13px;
    border-radius: 9px;
  }
  .league-title {
    gap: 5px;
  }
  .league-title h3 {
    font-size: 14px;
  }
  .near-tag {
    font-size: 9px;
  }
  .league-facts {
    gap: 8px;
    font-size: 10px;
  }
  .league-main p {
    font-size: 11px;
  }
  .simple-league .row-arrow {
    display: none;
  }
  .personal-nudge {
    padding: 18px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .personal-nudge > span:last-child {
    margin-left: 39px;
  }
  .dashboard-aside,
  .profile-layout,
  .coordination-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .next-match {
    padding: 20px 16px;
  }
  .section-kicker {
    font-size: 9px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .next-date {
    font-size: 25px;
    margin: 24px 0;
  }
  .next-date span {
    font-size: 16px;
  }
  .next-teams {
    gap: 10px;
  }
  .next-teams > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .next-teams b {
    font-size: 14px;
  }
  .next-actions {
    gap: 15px;
  }
  .next-actions .button {
    font-size: 11px;
  }
  .next-actions .quiet-link {
    font-size: 11px;
  }
  .next-meta {
    font-size: 10px;
  }
  .panel-head {
    padding: 17px;
  }
  .task-row {
    padding: 17px 14px;
    gap: 11px;
  }
  .agenda-row {
    padding: 17px 14px;
    gap: 11px;
    font-size: 11px;
  }
  .match-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }
  .match-controls label {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .match-controls select {
    max-width: 75%;
    min-height: 44px;
  }
  .match-controls .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .match-controls .tab {
    text-align: center;
    min-height: 44px;
    display: grid;
    place-items: center;
  }
  .time-fields {
    flex-wrap: wrap;
  }
  .time-fields input {
    width: 100%;
  }
  .profile-explainer {
    display: none;
  }
  .conversation {
    padding: 12px;
  }
  .form-body {
    padding: 18px;
  }
  .section-title {
    margin-top: 25px;
  }
  .small-note {
    font-size: 11px;
  }
}

/* Keep the phone preview scrollable without visible browser scrollbars. */
html.phone-preview-mode, html.phone-preview-mode *, #phone-preview, #phone-preview *, html:has(#phone-preview[open]), body:has(#phone-preview[open]) { scrollbar-width: none; -ms-overflow-style: none; }
html.phone-preview-mode::-webkit-scrollbar, html.phone-preview-mode *::-webkit-scrollbar, #phone-preview::-webkit-scrollbar, #phone-preview *::-webkit-scrollbar, html:has(#phone-preview[open])::-webkit-scrollbar, body:has(#phone-preview[open])::-webkit-scrollbar { display: none; width: 0; height: 0; }

.phone-keyboard { position:absolute; z-index:5; bottom:0; left:0; right:0; height:300px; box-sizing:border-box; padding:0 5px 35px; background:#cbd0d8; color:#111; font-family:system-ui,sans-serif; }
.phone-keyboard[hidden] { display:none; }
.phone-keyboard-tools { display:flex; align-items:center; justify-content:space-between; height:40px; padding:0 10px; font-size:12px; color:#45505d; }
.phone-keyboard button { border:0; border-radius:5px; background:#fff; color:#111; min-width:0; padding:0; height:43px; font:22px system-ui,sans-serif; box-shadow:0 1px 1px #0005; cursor:pointer; touch-action:manipulation; }
.phone-keyboard-tools button { font-size:15px; color:#1263cf; background:transparent; box-shadow:none; }
.phone-key-row { display:flex; justify-content:center; gap:5px; margin:8px 0; }
.phone-key-row button { flex:1; }
.phone-key-row:nth-child(3) { padding:0 16px; }
.phone-key-row .phone-key-wide { flex:1.5; background:#a9b1bd; font-size:18px; }
.phone-key-row .phone-key-space { flex:5; font-size:16px; }
.phone-keyboard button.active { background:#7fa8de; }
.phone-keyboard-open .phone-home { z-index:6; }
html.simulator-keyboard-open #app > .game-dock { display:none; }