/* ==========================================================================
   Cantinho Lo-fi — Vale Bucólico de Foco
   Cozy Glassmorphism UI · Safe-Area Ready · Desktop Drawer + Mobile Sheet
   ========================================================================== */

:root {
  --bg-deep: #181422;
  --glass-bg: rgba(25, 20, 34, 0.72);
  --glass-bg-strong: rgba(24, 19, 33, 0.88);
  --glass-card: rgba(255, 245, 234, 0.06);
  --glass-card-hover: rgba(255, 245, 234, 0.11);
  --border-soft: rgba(255, 236, 214, 0.14);
  --border-accent: rgba(244, 181, 117, 0.45);

  --text-main: #fdf5ec;
  --text-muted: #c8b8b0;
  --text-dim: #97857f;

  --accent-amber: #f2b472;
  --accent-peach: #f6a082;
  --accent-sage: #87c793;
  --accent-water: #7cc4e8;
  --accent-rose: #f19ab4;
  --accent-danger: #e57373;

  --radius-pill: 999px;
  --radius-card: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 10px 30px rgba(8, 6, 15, 0.42);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea {
  user-select: text;
  -webkit-user-select: text;
  font-family: inherit;
}

button {
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

.tabular {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Canvas & Ambient Vignette
   ========================================================================== */

#worldCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}

.ambient-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 62%, rgba(12, 8, 18, 0.34) 100%);
  z-index: 2;
}

/* ==========================================================================
   Top Minimal Glassmorphism HUD
   ========================================================================== */

.hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(12px + var(--safe-top)) calc(14px + var(--safe-right)) 8px calc(14px + var(--safe-left));
  pointer-events: none;
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.pill:hover {
  background: rgba(38, 30, 50, 0.85);
  border-color: var(--border-accent);
}

.pill:active {
  transform: scale(0.95);
}

.pill-icon {
  width: 40px;
  padding: 0;
  justify-content: center;
  font-size: 17px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8c8296;
  box-shadow: 0 0 8px rgba(140, 130, 150, 0.5);
  flex-shrink: 0;
}

.status-dot.connecting {
  background: var(--accent-amber);
  box-shadow: 0 0 10px rgba(242, 180, 114, 0.85);
  animation: pulseDot 1.2s infinite;
}

.status-dot.connected {
  background: var(--accent-sage);
  box-shadow: 0 0 10px rgba(135, 199, 147, 0.85);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.pill-currency {
  gap: 6px;
  font-size: 12.5px;
}

.currency-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.divider-dot {
  color: var(--text-dim);
}

.pill-timer {
  padding: 0 15px;
  gap: 8px;
  border-color: rgba(242, 180, 114, 0.28);
}

.pill-timer.running {
  border-color: rgba(135, 199, 147, 0.65);
  box-shadow: 0 0 18px rgba(135, 199, 147, 0.22), var(--shadow-soft);
}

.timer-seed-ico {
  font-size: 16px;
}

.timer-time {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.timer-phase-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(135, 199, 147, 0.18);
  color: var(--accent-sage);
}

.timer-phase-badge.break {
  background: rgba(124, 196, 232, 0.18);
  color: var(--accent-water);
}

.pill-menu {
  padding: 0 14px;
  background: rgba(242, 180, 114, 0.18);
  border-color: rgba(242, 180, 114, 0.4);
}

/* ==========================================================================
   Contextual Floating Action (Fishing Bite / Quick Hint)
   ========================================================================== */

.floating-action-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(66px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 22;
  pointer-events: none;
  max-width: calc(100vw - 24px);
}

.floating-action-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #f2b472, #f19ab4);
  color: #1f1626;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 8px 28px rgba(242, 180, 114, 0.45);
  animation: bobBounce 0.75s ease-in-out infinite alternate;
}

.floating-action-btn.calm {
  background: rgba(24, 19, 33, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  animation: none;
  font-size: 12px;
  padding: 6px 14px;
}

@keyframes bobBounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-5px) scale(1.04); }
}

/* ==========================================================================
   Mobile Zone Switcher (Portrait Only)
   ========================================================================== */

.zone-switcher {
  display: none;
  position: fixed;
  left: 50%;
  top: calc(60px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 19;
  gap: 5px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  transition: opacity 0.35s ease;
}

.zone-btn {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.zone-btn.active {
  background: rgba(242, 180, 114, 0.24);
  color: var(--text-main);
}

/* ==========================================================================
   Bottom Quick Reaction Bar
   ========================================================================== */

.hud-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 8px 12px calc(14px + var(--safe-bottom));
  pointer-events: none;
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.reaction-bar {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}

.reaction-bar::-webkit-scrollbar {
  display: none;
}

.react-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.react-btn:hover {
  background: rgba(255, 245, 234, 0.13);
  transform: translateY(-2px) scale(1.1);
}

.react-btn:active {
  transform: scale(0.88);
}

.reaction-sep {
  width: 1px;
  height: 20px;
  background: var(--border-soft);
  margin: 0 3px;
  flex-shrink: 0;
}

/* ==========================================================================
   Zen Mode
   ========================================================================== */

body.zen-mode .hud-top,
body.zen-mode .hud-bottom,
body.zen-mode .zone-switcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

body.zen-mode .hud-bottom {
  transform: translateY(12px);
}

.zen-overlay {
  position: fixed;
  right: calc(16px + var(--safe-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 30;
}

.zen-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(20, 16, 28, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 236, 214, 0.14);
  font-size: 13px;
  color: rgba(253, 245, 236, 0.88);
}

.zen-time {
  font-weight: 700;
}

.zen-phase {
  color: var(--text-muted);
  font-size: 12px;
}

.zen-exit-btn {
  margin-left: 4px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 245, 234, 0.12);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s;
}

.zen-exit-btn:hover {
  background: rgba(242, 180, 114, 0.28);
}

/* ==========================================================================
   Control Drawer (Side Drawer Desktop / Bottom Sheet Mobile)
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10, 7, 16, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.control-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(410px, calc(100vw - 24px));
  z-index: 45;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-soft);
  box-shadow: 0 20px 55px rgba(4, 2, 10, 0.6);
  overflow: hidden;
  animation: drawerInRight 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes drawerInRight {
  from { opacity: 0; transform: translateX(26px); }
  to { opacity: 1; transform: translateX(0); }
}

.drawer-handle {
  display: none;
  justify-content: center;
  padding: 10px 0 2px;
}

.drawer-handle span {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 236, 214, 0.28);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
}

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

.brand-leaf {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(135, 199, 147, 0.24), rgba(242, 180, 114, 0.22));
  border: 1px solid rgba(135, 199, 147, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-sub {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--accent-sage);
  font-weight: 600;
}

.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 245, 234, 0.08);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}

.close-btn:hover {
  background: rgba(255, 245, 234, 0.18);
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--border-soft);
}

.tab-btn {
  padding: 8px 4px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(255, 245, 234, 0.07);
  color: var(--text-main);
}

.tab-btn.active {
  background: rgba(242, 180, 114, 0.2);
  color: var(--accent-amber);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px calc(20px + var(--safe-bottom));
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 236, 214, 0.2) transparent;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.tab-pane.active {
  display: flex;
}

/* ==========================================================================
   Cards, Buttons & Form Controls
   ========================================================================== */

.card {
  background: var(--glass-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 14px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-title-row h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.hint-text {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.desc-text {
  margin: 0 0 11px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.small-margin {
  margin: 10px 0;
}

.tip-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--accent-sage);
  line-height: 1.4;
}

.badge-soft {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(242, 180, 114, 0.16);
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: 700;
}

.btn-primary {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f2b472, #ea9276);
  color: #1f1524;
  font-weight: 800;
  font-size: 13.5px;
  transition: transform 0.14s ease, filter 0.18s ease;
}

.btn-primary:hover {
  filter: brightness(1.07);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 245, 234, 0.1);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  transition: background 0.18s;
}

.btn-secondary:hover {
  background: rgba(255, 245, 234, 0.16);
}

.btn-danger {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(229, 115, 115, 0.18);
  border: 1px solid rgba(229, 115, 115, 0.38);
  color: #ffb3b3;
  font-weight: 700;
  font-size: 13px;
}

.btn-mini {
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(255, 245, 234, 0.1);
  border: 1px solid var(--border-soft);
  font-size: 11.5px;
  font-weight: 700;
  transition: background 0.16s;
}

.btn-mini:hover {
  background: rgba(242, 180, 114, 0.22);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12.5px;
}

.full-w {
  width: 100%;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(14, 10, 22, 0.55);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: var(--accent-amber);
}

/* ==========================================================================
   Tab 1: Pomodoro & Forest Growth
   ========================================================================== */

.timer-card {
  background: linear-gradient(160deg, rgba(135, 199, 147, 0.09), rgba(242, 180, 114, 0.08));
}

.timer-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.phase-pill {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-sage);
}

.cycles-pill {
  font-size: 11.5px;
  color: var(--text-muted);
}

.timer-display-wrap {
  text-align: center;
  margin: 4px 0 12px;
}

.forest-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(18, 14, 28, 0.55);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.forest-preview-emoji {
  font-size: 16px;
}

.timer-big {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text-main);
}

.growth-bar-track {
  height: 7px;
  width: 100%;
  border-radius: 99px;
  background: rgba(255, 245, 234, 0.1);
  overflow: hidden;
  margin-top: 10px;
}

.growth-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #87c793, #f2b472);
  transition: width 0.45s ease;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 11px;
}

.preset-btn {
  padding: 7px 4px;
  border-radius: 10px;
  background: rgba(255, 245, 234, 0.06);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.preset-btn.active {
  background: rgba(242, 180, 114, 0.22);
  border-color: var(--border-accent);
  color: var(--text-main);
}

.timer-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.species-grid,
.seed-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.species-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 6px;
  border-radius: 13px;
  background: rgba(255, 245, 234, 0.05);
  border: 1px solid var(--border-soft);
  text-align: center;
  transition: all 0.16s ease;
}

.species-card:hover:not(.locked) {
  background: var(--glass-card-hover);
}

.species-card.active {
  background: rgba(135, 199, 147, 0.2);
  border-color: rgba(135, 199, 147, 0.65);
}

.species-card.locked {
  opacity: 0.48;
  cursor: not-allowed;
}

.species-card .sp-ico {
  font-size: 22px;
}

.species-card .sp-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.species-card .sp-meta {
  font-size: 10px;
  color: var(--text-dim);
}

/* Tasks */
.task-form {
  display: flex;
  gap: 7px;
  margin-bottom: 10px;
}

.btn-icon-accent {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(242, 180, 114, 0.22);
  border: 1px solid var(--border-accent);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(18, 13, 27, 0.45);
  border: 1px solid rgba(255, 236, 214, 0.07);
}

.task-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.task-item.done .task-check {
  background: var(--accent-sage);
  border-color: var(--accent-sage);
  color: #152119;
}

.task-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
  word-break: break-word;
}

.task-item.done .task-text {
  text-decoration: line-through;
  color: var(--text-dim);
}

.task-del {
  font-size: 13px;
  color: var(--text-dim);
  padding: 4px;
}

.task-del:hover {
  color: var(--accent-danger);
}

.empty-state {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ==========================================================================
   Tab 2: Vale (Subtabs: Jardim, Pesca, Loja)
   ========================================================================== */

.subtab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(15, 11, 22, 0.45);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
}

.subtab-btn {
  padding: 7px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.subtab-btn.active {
  background: rgba(135, 199, 147, 0.22);
  color: var(--text-main);
}

.subtab-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.subtab-pane.active {
  display: flex;
}

.garden-plots-ui {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.plot-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 13px;
  background: rgba(20, 15, 28, 0.52);
  border: 1px solid var(--border-soft);
  text-align: center;
}

.plot-chip.ready {
  border-color: rgba(242, 180, 114, 0.72);
  background: rgba(242, 180, 114, 0.14);
}

.plot-chip .p-ico {
  font-size: 20px;
}

.plot-chip .p-status {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.fish-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(16, 12, 24, 0.5);
  border: 1px solid var(--border-soft);
}

.fish-card.uncaught {
  opacity: 0.45;
}

.fish-ico {
  font-size: 22px;
  flex-shrink: 0;
}

.fish-info {
  min-width: 0;
}

.fish-name {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fish-meta {
  font-size: 10.5px;
  color: var(--text-dim);
}

.shop-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(124, 196, 232, 0.14), rgba(135, 199, 147, 0.12));
}

.label-muted {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

.balance-big {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-water);
}

.balance-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 13px;
  background: rgba(16, 12, 24, 0.5);
  border: 1px solid var(--border-soft);
}

.shop-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shop-ico {
  font-size: 22px;
  flex-shrink: 0;
}

.shop-name {
  font-size: 12.5px;
  font-weight: 800;
}

.shop-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.25;
}

.btn-buy {
  padding: 6px 11px;
  border-radius: 10px;
  background: rgba(242, 180, 114, 0.22);
  border: 1px solid var(--border-accent);
  color: var(--accent-amber);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-buy.owned {
  background: rgba(135, 199, 147, 0.18);
  border-color: rgba(135, 199, 147, 0.45);
  color: var(--accent-sage);
}

/* ==========================================================================
   Tab 3: Sound, Weather, Pet
   ========================================================================== */

.slider-group {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slider-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 245, 234, 0.14);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 13px;
  background: rgba(255, 245, 234, 0.05);
  border: 1px solid var(--border-soft);
  font-size: 20px;
  transition: all 0.16s;
}

.choice-card small {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.choice-card.active {
  background: rgba(242, 180, 114, 0.22);
  border-color: var(--border-accent);
}

.choice-card.active small {
  color: var(--text-main);
}

/* ==========================================================================
   Tab 4: Avatar Editor
   ========================================================================== */

.field-group {
  margin-bottom: 12px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.15s, border-color 0.15s;
}

.swatch.active {
  border-color: #fff;
  transform: scale(1.16);
  box-shadow: 0 0 0 3px rgba(242, 180, 114, 0.5);
}

.pill-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-choice {
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 245, 234, 0.06);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.pill-choice.active {
  background: rgba(242, 180, 114, 0.24);
  border-color: var(--border-accent);
  color: var(--text-main);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.acc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255, 245, 234, 0.06);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.acc-toggle.active {
  background: rgba(135, 199, 147, 0.2);
  border-color: rgba(135, 199, 147, 0.55);
  color: var(--text-main);
}

/* ==========================================================================
   Tab 5: Room & Solo Companion
   ========================================================================== */

.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--text-dim);
  font-size: 11.5px;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.join-form {
  display: flex;
  gap: 7px;
}

.room-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(15, 11, 22, 0.6);
  border: 1px solid var(--border-accent);
}

.room-code-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-amber);
}

.room-copy-btns {
  display: flex;
  gap: 5px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(255, 245, 234, 0.16);
  transition: 0.2s;
  cursor: pointer;
}

.slider-switch::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}

.switch input:checked + .slider-switch {
  background: var(--accent-sage);
}

.switch input:checked + .slider-switch::before {
  transform: translateX(20px);
}

/* ==========================================================================
   Post-it Corkboard Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 7, 16, 0.64);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: min(460px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--border-soft);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  padding: 18px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.note-form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-colors {
  display: flex;
  gap: 7px;
}

.note-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.note-color-dot.active {
  border-color: #fff;
  transform: scale(1.15);
}

.notes-board {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: repeating-linear-gradient(
    45deg,
    rgba(130, 88, 56, 0.32),
    rgba(130, 88, 56, 0.32) 10px,
    rgba(116, 76, 46, 0.32) 10px,
    rgba(116, 76, 46, 0.32) 20px
  );
  border: 1px solid rgba(210, 155, 105, 0.28);
  min-height: 140px;
}

.sticky-note {
  position: relative;
  padding: 20px 24px 24px 12px;
  border-radius: 4px 4px 12px 4px;
  color: #2c2018;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
  word-break: break-word;
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(185, 65, 55, 0.8);
}

.sticky-author {
  position: absolute;
  left: 10px;
  bottom: 6px;
  font-size: 10px;
  opacity: 0.7;
}

.sticky-del {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 12px;
  color: rgba(44, 32, 24, 0.55);
}

.sticky-del:hover {
  color: #9e2a2b;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-stack {
  position: fixed;
  top: calc(14px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(90vw, 340px);
}

.toast {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(24, 19, 34, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Responsive Mobile Bottom Sheet (max-width: 640px)
   ========================================================================== */

@media (max-width: 780px) {
  .menu-text,
  #statusLabel {
    display: none;
  }
  .pill-status {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .pill-menu {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .pill {
    height: 38px;
    font-size: 12.5px;
  }
  .timer-phase-badge {
    display: none;
  }
}

@media (max-width: 640px) {
  .zone-switcher {
    display: inline-flex;
  }

  .control-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 84dvh;
    border-radius: 26px 26px 0 0;
    border-bottom: none;
    animation: sheetInUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @keyframes sheetInUp {
    from { opacity: 0; transform: translateY(45px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .drawer-handle {
    display: flex;
  }

  .drawer-header {
    padding-top: 6px;
  }

  .hud-top {
    padding-left: calc(10px + var(--safe-left));
    padding-right: calc(10px + var(--safe-right));
  }

  .hud-group {
    gap: 5px;
  }

  .pill-currency {
    padding: 0 9px;
    font-size: 11.5px;
  }

  .pill-timer {
    padding: 0 11px;
  }

  .notes-board {
    grid-template-columns: 1fr;
  }
}
