/* Presentation only. Existing action hooks and application state stay in app.js. */
:root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --card2: #f0f3f2;
    --text: #202b28;
    --muted: #737d79;
    --line: #e8ecea;
    --accent: #24765b;
    --accent2: #1c604a;
    --primary: #24765b;
}
body { background: var(--bg); padding: 28px 36px 52px; letter-spacing: -.2px; }
.wrap { max-width: 1180px; }
button, .btn { font-weight: 600; border-radius: 13px; transition: background .18s, box-shadow .18s, transform .18s; }
button:active { transform: scale(.97); }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -.4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 4px 18px #253c3004; }
.panel { padding: 26px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.brand { margin: 0; gap: 13px; }
.logo { width: 48px; height: 48px; border-radius: 15px; color: var(--accent); background: #e5eee8; }
.logo svg { width: 27px; height: 27px; }
.brand-title { font-size: 23px; font-weight: 600; line-height: 1.3; }
.brand-subtitle { font-size: 11px; letter-spacing: 1.1px; margin-top: 4px; }
.brand-terminal { display: inline-flex; align-items: baseline; min-width: 15ch; white-space: nowrap; font-family: 'Courier New', ui-monospace, monospace; color: #315944; letter-spacing: -.8px; text-shadow: 0 0 1px #31594440; }
.brand-cursor { display: inline-block; width: .52em; height: 1.04em; margin: 0 1px; background: currentColor; align-self: center; animation: terminalBlink 1.1s steps(1) infinite; opacity: .8; }
.brand-terminal.is-editing .brand-cursor { animation: none; }
@keyframes terminalBlink { 0%, 48% { opacity: .8; } 49%, 100% { opacity: 0; } }
.header-right-section { gap: 14px; }
.user-profile-card { padding: 10px 16px; border-radius: 18px; box-shadow: none; }
.user-profile-card:hover { background: #fff; box-shadow: 0 5px 16px #253c3009; transform: translateY(-1px); }
.user-profile-header { gap: 10px; }
.user-avatar { background: #edf2ef; width: 36px; height: 36px; font-size: 17px; color: var(--accent); }
.user-info h3 { font-size: 14px; }
.user-stats-mini { font-size: 11px; }
.stress-relief-btn { width: 52px; height: 52px; flex-basis: 52px; background: #24765b; box-shadow: 0 3px 10px #24765b15; }
.stress-relief-btn:hover { box-shadow: 0 5px 16px #24765b25; transform: scale(1.04); }
.stress-icon { font-size: 18px; }
.stress-count { font-size: 11px; }
.stress-speed { font-size: 8px; }
.hero { display: block; margin-bottom: 24px; }
.hero-main { background: #edf3ed; border-color: #e4ece3; display: grid; grid-template-columns: 1.45fr 1fr; padding: 38px 40px; position: relative; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 1.8px; line-height: 1.6; }
.hero .eyebrow { color: #56715e; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; background: #24765b; border-radius: 50%; }
.hero-main h1 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.28; font-weight: 650; letter-spacing: -1.7px; margin: 17px 0 14px; }
.heading-dot { color: var(--accent); }
.hero .note { font-size: 13px; line-height: 1.9; color: #6a7c6e; }
.hero .button-row { gap: 8px; margin-top: 24px; }
.hero .btn { padding: 11px 14px; font-size: 12px; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 3px 8px #24765b10; }
.btn-primary:hover { background: var(--accent2); }
.btn-secondary { background: #f0f3f1; color: #476052; border: 1px solid transparent; }
.btn-secondary:hover { background: #e4eae6; }
.hero .btn-secondary { background: #ffffffa6; }
.quiet-art { position: relative; min-height: 248px; display: grid; place-items: center; }
.quiet-orbit { position: absolute; border-radius: 50%; border: 1px solid #24765b0e; top: 44%; left: 54%; transform: translate(-50%, -50%); }
.orbit-one { width: 268px; height: 268px; }
.orbit-two { width: 204px; height: 204px; border-color: #24765b12; background: #24765b03; }
.orbit-three { width: 136px; height: 136px; background: #ffffff55; border-color: #ffffff90; }
.quiet-wave { position: absolute; top: 44%; left: 54%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 7px; height: 78px; }
.quiet-wave i { width: 7px; border-radius: 9px; background: #68927a; height: 22px; }
.quiet-wave i:nth-child(2), .quiet-wave i:nth-child(8) { height: 35px; background: #527e64; }
.quiet-wave i:nth-child(3), .quiet-wave i:nth-child(7) { height: 53px; background: #3f7055; }
.quiet-wave i:nth-child(4), .quiet-wave i:nth-child(6) { height: 38px; background: #2a6145; }
.quiet-wave i:nth-child(5) { height: 72px; background: #24765b; }
.quiet-caption { position: absolute; top: 87%; left: 54%; transform: translateX(-50%); white-space: nowrap; font-size: 13px; color: #52715b; }
.quiet-caption span { display: block; font-size: 8px; letter-spacing: 2px; text-align: center; margin-top: 5px; opacity: .65; }
.tabs { display: flex; gap: 5px; padding: 6px; background: #e9edeb; border: 0; border-radius: 19px; margin-bottom: 30px; }
.tab { flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 45px; background: transparent; color: #768079; border: 0; border-radius: 14px; font-size: 13px; white-space: nowrap; }
.tab-icon { width: 19px; height: 19px; flex-shrink: 0; }
.tab:hover { background: #ffffff70; }
.tab.active { background: #fff; color: var(--accent); box-shadow: 0 2px 7px #233e3110; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 3px 20px; gap: 12px; }
.section-heading h2 { font-size: 23px; font-weight: 650; letter-spacing: -.6px; margin-top: 6px; }
.section-note { color: #909992; font-size: 12px; padding-bottom: 2px; }
.grid, .detail-hero { gap: 22px; }
.discover-grid { grid-template-columns: minmax(0, 1fr) 282px; align-items: start; }
#discover .discover-grid > .panel:first-child { padding: 22px; }
#discover .discover-grid > .panel:last-child { background: #fafbf9; }
.toolbar { margin-bottom: 20px; gap: 16px; }
.search { max-width: none; min-width: 140px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, select, .map-filters input { background: #f5f7f6; color: var(--text); border: 1px solid #e9eeeb; border-radius: 12px; font-size: 14px; padding: 12px 14px; min-height: 44px; }
input::placeholder, textarea::placeholder { color: #9aa39e; }
input:focus, textarea:focus, select:focus { border-color: #83ad97; box-shadow: 0 0 0 3px #24765b0c; }
#searchInput { padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23909c94' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
.time-switch { gap: 2px; background: #f0f3f1; border-radius: 11px; padding: 3px; flex-wrap: nowrap; }
.time-btn { padding: 7px 12px; min-height: 34px; background: transparent; color: var(--muted); border: 0; border-radius: 8px; font-size: 12px; white-space: nowrap; }
.time-btn:hover { background: #e3e9e5; }
.time-btn.active { background: white; color: var(--accent); box-shadow: 0 1px 5px #213b3012; }
.cafe-list { gap: 16px; }
.cafe { grid-template-columns: 164px minmax(0, 1fr); padding: 10px; border-radius: 20px; background: white; border-color: #e9eeeb; align-items: stretch; }
.cafe:hover { border-color: #a3c0ae; transform: translateY(-2px); box-shadow: 0 7px 20px #203b3009; }
.cafe img { border-radius: 13px; min-height: 174px; }
.cafe-body { padding: 6px 6px 6px 18px; }
.cafe h3 { font-size: 16px; font-weight: 650; line-height: 1.4; }
.meta { font-size: 12px; margin-top: 5px; }
.score { min-width: 49px; padding: 8px 10px; border-radius: 13px; font-size: 23px; line-height: 1.2; font-weight: 650; background: #e7f1e9; color: var(--accent); font-variant-numeric: tabular-nums; }
.score.empty { background: #f1f4f2; color: var(--muted); font-size: 12px; }
.metrics { grid-template-rows: none; grid-auto-rows: auto; gap: 10px; }
.metric { background: #f4f7f4; border: 0; border-radius: 13px; padding: 15px; }
.cafe .metrics { gap: 7px; }
.cafe .metric { padding: 8px 10px; border-radius: 10px; }
.metric .k { font-size: 11px; }
.metric .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cafe .metric .v { font-size: 16px; margin-top: 2px; }
.chip { padding: 4px 9px; border: 0; background: #f0f3f0; color: #7b897f; font-size: 10px; border-radius: 7px; }
.highlight { color: var(--accent); }
.guide-icon { width: 39px; height: 39px; border-radius: 12px; background: #eaf0e7; color: var(--accent); font-size: 22px; display: grid; place-items: center; margin-bottom: 24px; }
#discover .panel > .eyebrow { font-size: 9px; }
#discover .panel > h3 { margin: 7px 0 24px; font-size: 18px; }
.guide-steps { list-style: none; counter-reset: guide; display: grid; gap: 22px; }
.guide-steps li { counter-increment: guide; padding-left: 33px; position: relative; }
.guide-steps li::before { content: counter(guide, decimal-leading-zero); position: absolute; top: 1px; left: 0; font-size: 11px; font-family: ui-monospace, monospace; color: #9aad9e; }
.guide-steps strong { display: block; font-size: 12px; font-weight: 600; }
.guide-steps span { display: block; margin-top: 5px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.map-box { background: #eff3f0; border-radius: 20px; }
.map-tip { background: #fff; border: 0; box-shadow: 0 3px 14px #213b3015; font-size: 11px; }
.map-filters { align-items: center; }
.map-filters label { font-size: 12px; }
.map-filters select { width: auto; }
#pickMapLocation[aria-pressed="true"] { background: #dcecdf; color: var(--accent); }
.cafe-map-marker { background: white; color: var(--text); box-shadow: 0 3px 12px #203b3020; }
.marker-score { background: #edf4ee; }
.cafe-map-marker.uploaded { border-color: #24765b; }
.detail-title { color: white; }
.detail-title .muted { color: #ffffffd6; }
.detail-score { background: #edf4ed; color: var(--accent); font-weight: 650; }
.detail-cover { border-radius: 26px 26px 0 0; }
.review { background: #f4f7f4; color: var(--text); border: 0; }
.bar { box-shadow: none; background: #7ca78a; }
.drop { background: #f6f8f5; border-color: #bfd0c0; border-radius: 20px; padding: 34px 24px; }
.drop:hover { background: #edf3ed; }
.drop-icon { font-size: 36px; }
.record-controls { flex-wrap: wrap; }
.timer-disc { background: #edf4ed; border: 1px solid #dce9dc; }
.timer-display { font-weight: 550; font-size: 52px; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.timer-hand::before { box-shadow: none; }
.time-slider input[type="range"] { background: #dfe9e1; }
.time-slider input[type="range"]::-webkit-slider-thumb { background: white; width: 26px; height: 26px; box-shadow: 0 2px 8px #253c3025; }
.time-slider input[type="range"]::-moz-range-thumb { background: white; width: 26px; height: 26px; box-shadow: 0 2px 8px #253c3025; }
#pomodoroMode { margin-top: 24px; }
.modal { background: #15291b55; padding: 16px; }
.modal-content { border: 0; padding: 28px; border-radius: 26px; box-shadow: 0 24px 80px #15291b22; width: 100%; }
.modal-close { background: #f0f3f1; }
.modal-close:hover { background: #e7ede8; }
.btn-link { text-decoration: none; }
.guest-overlay { background: #f5f6f8ed; backdrop-filter: none; -webkit-backdrop-filter: none; }
.guest-overlay-content { background: white; color: var(--text); box-shadow: 0 12px 40px #203b3010; }
#poiInfoDisplay, #detailPoiInfo { background: #f4f7f4 !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-radius: 16px !important; padding: 18px !important; }
#poiInfoDisplay div, #poiInfoDisplay h4, #poiInfoDisplay strong, #detailPoiInfo div, #detailPoiInfo h4, #detailPoiInfo strong { color: var(--text) !important; }
#poiInfoDisplay div[style*="background"], #detailPoiInfo div[style*="background"] { background: #eaf1e9 !important; border-radius: 9px !important; }
#cafeSearchResults .cafe { grid-template-columns: 1fr; }
.tape { box-shadow: 0 6px 20px #203b3018; border-radius: 17px; }
.tape-value { color: #80c39b; }
::selection { background: #c7dfce; color: var(--text); }
@media (max-width: 1000px) {
    body { padding: 24px; }
    .hero-main { padding: 32px; }
    .discover-grid { grid-template-columns: minmax(0, 1fr) 245px; }
    .cafe { grid-template-columns: 125px minmax(0, 1fr); }
    .cafe-body { padding-left: 12px; }
    .tab { gap: 5px; font-size: 12px; }
}
@media (max-width: 900px) {
    .discover-grid, .detail-hero, .record-grid, .pomodoro-grid { grid-template-columns: 1fr; }
    .cafe { grid-template-columns: 164px minmax(0, 1fr); }
    #discover .discover-grid > .panel:last-child { margin-top: 2px; }
    .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quiet-art { min-height: 260px; }
    .orbit-one { width: 228px; height: 228px; }
    .orbit-two { width: 174px; height: 174px; }
    .orbit-three { width: 120px; height: 120px; }
    .hero-main h1 { font-size: 37px; }
}
@media (max-width: 640px) {
    body { padding: calc(20px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
    .app-header { flex-wrap: wrap; gap: 17px; margin-bottom: 20px; }
    .brand { gap: 10px; }
    .brand-title { font-size: 21px; }
    .logo { width: 42px; height: 42px; border-radius: 13px; }
    .brand-subtitle { font-size: 10px; }
    .header-right-section { width: 100%; flex-direction: row-reverse; gap: 10px; }
    .user-profile-card { flex: 1; padding: 10px 14px; }
    .user-profile-header { gap: 10px; }
    .stress-relief-btn { height: 50px; width: 50px; flex-basis: 50px; }
    .hero-main { display: block; padding: 26px 24px; border-radius: 24px; }
    .hero-main h1 { font-size: 36px; margin-top: 16px; }
    .hero .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
    .hero .note { font-size: 12px; }
    .hero .button-row { gap: 7px; margin-top: 22px; }
    .hero .btn { font-size: 12px; padding: 10px 12px; min-height: 40px; }
    .quiet-art { display: none; }
    .hero { margin-bottom: 20px; }
    .tabs { display: flex; overflow-x: auto; gap: 2px; padding: 5px; border-radius: 16px; margin-bottom: 25px; scrollbar-width: none; scroll-padding: 5px; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { flex: 0 0 62px; flex-direction: column; gap: 5px; padding: 9px 7px; font-size: 10px; border-radius: 12px; min-height: 60px; }
    .tab-icon { width: 19px; height: 19px; }
    .section-heading { align-items: start; margin-bottom: 16px; }
    .section-heading h2 { font-size: 21px; }
    .section-heading .eyebrow { font-size: 8px; }
    .section-note { display: none; }
    .card { border-radius: 22px; }
    .panel, #discover .discover-grid > .panel:first-child { padding: 18px; }
    .toolbar { gap: 12px; }
    .time-switch { justify-content: stretch; }
    .time-btn { flex: 1; min-height: 38px; }
    .cafe { grid-template-columns: 1fr; padding: 9px; border-radius: 18px; }
    .cafe img { height: 165px; min-height: 0; border-radius: 12px; }
    .cafe-body { padding: 15px 6px 7px; }
    .cafe h3 { font-size: 17px; }
    .cafe .metric { padding: 10px 12px; }
    .chip { font-size: 11px; }
    .guide-steps { grid-template-columns: 1fr; }
    .guide-steps strong { font-size: 13px; }
    .guide-steps span { font-size: 12px; }
    .guide-icon { margin-bottom: 18px; }
    .metrics, .user-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .timer-disc { width: 236px; height: 236px; }
    .timer-hand { height: 99px; }
    .timer-display { font-size: 46px; }
    .map-filters label { flex: 1 1 100%; align-items: start; flex-direction: column; }
    .map-filters input, .map-filters select { width: 100%; }
    #map .toolbar > div { gap: 8px !important; }
    #map .toolbar .btn { font-size: 11px; padding: 9px 11px; min-height: 40px; }
    .detail-cover { border-radius: 22px 22px 0 0; }
    .modal-content { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .brand-cursor { animation: none; opacity: .6; }
}
@media (max-width: 640px) {
    .hero .button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tab { flex: 1 0 52px; padding-left: 5px; padding-right: 5px; }
}
/* Compact app bar and a palette shared by both appearance modes. */
:root {
    color-scheme: light;
    --surface-soft: #f4f7f4;
    --surface-input: #f5f7f6;
    --surface-muted: #edf2ef;
    --surface-tabs: #e9edeb;
    --surface-selected: #ffffff;
    --button-secondary: #f0f3f1;
    --button-hover: #e4eae6;
    --tint: #e7f1e9;
    --tint-text: #24765b;
    --border-input: #e9eeeb;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111815;
    --card: #1b2420;
    --card2: #242f29;
    --text: #e7ede9;
    --muted: #a0aea5;
    --line: #303d35;
    --accent: #8bc5a3;
    --accent2: #afd7bd;
    --primary: #8bc5a3;
    --surface-soft: #222d26;
    --surface-input: #141d18;
    --surface-muted: #26362c;
    --surface-tabs: #1b2420;
    --surface-selected: #304238;
    --button-secondary: #29372f;
    --button-hover: #34483c;
    --tint: #2b4234;
    --tint-text: #a4d2b5;
    --border-input: #35463b;
}
.app-header { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 22px; margin-bottom: 24px; }
.header-controls, .appearance-controls, .header-actions { display: flex; align-items: center; gap: 8px; }
.header-controls { gap: 18px; }
.appearance-controls { padding-right: 18px; border-right: 1px solid var(--line); }
.header-control { display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--text); min-width: 40px; height: 40px; padding: 8px; border-radius: 12px; }
.header-control:hover { background: var(--button-hover); }
.header-control svg { width: 19px; height: 19px; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }
.language-control { font-size: 12px; letter-spacing: .3px; white-space: nowrap; }
.header-actions .btn { min-height: 40px; padding: 9px 13px; font-size: 12px; white-space: nowrap; }
.header-right-section { gap: 10px; }
.discover-content { grid-template-columns: minmax(0, 1fr); }
#discover .discover-content > .panel { background: var(--card); }
#discoverList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#discover .toolbar { gap: 20px; }
#discover .search { max-width: 480px; }
#discoverList .cafe { grid-template-columns: 140px minmax(0, 1fr); }
.brand-terminal { color: var(--tint-text); }
.logo, .user-avatar { background: var(--surface-muted); }
.user-profile-card:hover { background: var(--card); }
.btn-primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #14231a; }
.btn-secondary { background: var(--button-secondary); color: var(--text); }
.btn-secondary:hover { background: var(--button-hover); }
.tabs { background: var(--surface-tabs); }
.tab { color: var(--muted); }
.tab:hover { background: var(--button-secondary); }
.tab.active { background: var(--surface-selected); color: var(--accent); }
.section-note { color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, select, .map-filters input { background-color: var(--surface-input); border-color: var(--border-input); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.time-switch { background: var(--button-secondary); }
.time-btn:hover { background: var(--button-hover); }
.time-btn.active { background: var(--surface-selected); }
.cafe { background: var(--card); border-color: var(--line); }
.cafe:hover { border-color: var(--accent); }
.score { background: var(--tint); color: var(--tint-text); }
.score.empty { background: var(--surface-soft); }
.metric, .review { background: var(--surface-soft); }
.chip { background: var(--surface-muted); color: var(--muted); }
.drop { background: var(--surface-input); border-color: var(--border-input); }
.drop:hover { background: var(--surface-soft); }
.timer-disc { background: var(--surface-soft); border-color: var(--line); }
.time-slider input[type="range"] { background: var(--line); }
.map-box { background: var(--surface-soft); }
.map-tip { background: var(--card); color: var(--text); }
.cafe-map-marker { background: var(--card); color: var(--text); }
.marker-score { background: var(--tint); }
.cafe-map-info { color: var(--text); background: var(--card); border-radius: 14px; }
[data-theme="dark"] .amap-info-content { background: var(--card); border-color: var(--line); }
.modal-close { background: var(--surface-muted); }
.modal-close:hover { background: var(--button-hover); }
.guest-overlay { background: var(--bg); }
.guest-overlay-content { background: var(--card); }
#poiInfoDisplay, #detailPoiInfo { background: var(--surface-soft) !important; }
#poiInfoDisplay div[style*="background"], #detailPoiInfo div[style*="background"] { background: var(--surface-muted) !important; }
#noise_level[data-localized] { font-size: 0; }
#noise_level[data-localized]::after { content: attr(data-display); font-size: 20px; }
.audio-waveform { border-radius: 13px !important; }
.message { max-width: calc(100vw - 32px); }
html[lang="en"] .brand-subtitle { letter-spacing: .1px; }
html[lang="en"] .metric .k { line-height: 1.5; }
@media (max-width: 1120px) {
    .app-header { grid-template-columns: minmax(220px, 1fr) auto; gap: 16px; }
    .header-right-section { grid-column: 1 / -1; justify-self: end; }
    #discoverList { grid-template-columns: 1fr; }
    #discoverList .cafe { grid-template-columns: 164px minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .app-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 8px; margin-bottom: 20px; }
    .brand { grid-column: 1; grid-row: 1; }
    .brand-title { font-size: 17px; }
    .brand-terminal { min-width: 13ch; }
    .brand-subtitle { font-size: 9px; letter-spacing: .2px; }
    .logo { width: 34px; height: 34px; border-radius: 10px; }
    .logo svg { width: 22px; height: 22px; }
    .brand { gap: 8px; }
    .header-controls { display: contents; }
    .appearance-controls { grid-column: 2; grid-row: 1; border: 0; padding: 0; gap: 6px; }
    .header-control { min-width: 35px; width: 35px; height: 35px; border-radius: 10px; }
    .header-actions { grid-column: 1; grid-row: 2; flex-wrap: wrap; gap: 6px; }
    .header-actions .btn { padding: 8px 10px; min-height: 36px; font-size: 11px; }
    .header-right-section { grid-column: 2; grid-row: 2; width: auto; flex-direction: row; gap: 6px; }
    .user-profile-card { flex: none; padding: 8px 10px; border-radius: 12px; }
    .user-stats-mini, .user-avatar { display: none; }
    .user-info h3 { font-size: 12px; margin: 0; }
    .stress-relief-btn { width: 36px; height: 36px; flex-basis: 36px; }
    .stress-icon { font-size: 11px; margin: 0; }
    .stress-count { font-size: 9px; }
    .stress-speed { font-size: 6px; }
    #discover .toolbar { gap: 12px; }
    #discover .search { max-width: none; }
    #discoverList .cafe { grid-template-columns: 1fr; }
    html[lang="en"] .tab { flex-basis: 52px; }
    html[lang="en"] .tab span { font-size: 10px; }
    html[lang="en"] .section-heading h2 { font-size: 20px; }
    html[lang="en"] .record-controls .btn { font-size: 12px; padding: 10px 12px; }
}
@media (max-width: 360px) {
    .brand-title { font-size: 15px; }
    .brand-subtitle { font-size: 8px; }
    .logo { display: none; }
}
#discover .discover-grid.discover-content > .panel { background: var(--card); }
#discover .discover-grid.discover-content > .panel { padding: 22px; }
@media (max-width: 640px) {
    #discover .discover-grid.discover-content > .panel { padding: 18px; }
}

@media (max-width: 640px) { .language-control { width: 40px; min-width: 40px; } }
@media (max-width: 640px) {
    .tab { min-width: 0; }
    html[lang="en"] .tab span { letter-spacing: -.3px; }
}
.current-sound { margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.current-sound .note { margin-top: 10px; font-size: 12px; line-height: 1.7; }
.current-sound audio { display: block; margin-top: 14px; width: 100%; }
.current-sound .btn { max-width: 100%; }
.cafe-search-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cafe-search-toolbar .search { flex: 1 1 280px; }
.cafe-search-toolbar input { width: 100%; }
.nearby-search-controls { display: flex; align-items: center; gap: 8px; }
.nearby-search-controls label { font-size: 12px; white-space: nowrap; }
#nearbyCafeRadius { width: auto; min-width: 86px; padding: 10px; }
.cafe-search-hint { font-size: 12px; margin: 12px 0 4px; }
#cafeSearchStatus { font-size: 12px; margin: 4px 0 14px; }
#cafeSearchResults { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 380px; overflow-y: auto; gap: 10px; }
.poi-result { display: flex; align-items: center; gap: 12px; background: var(--surface-soft); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: left; width: 100%; }
.poi-result:hover { background: var(--button-hover); border-color: var(--accent); }
.poi-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--tint); font-size: 20px; }
.poi-copy { display: grid; gap: 5px; min-width: 0; flex: 1; }
.poi-copy strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.poi-copy > span { font-size: 11px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.poi-copy .poi-district { font-size: 10px; }
.poi-result-end { display: grid; justify-items: end; gap: 10px; flex-shrink: 0; }
.poi-distance { font-size: 11px; color: var(--muted); font-weight: 500; }
.poi-select { font-size: 11px; color: var(--accent); }
@media (max-width: 720px) {
    #cafeSearchResults { grid-template-columns: 1fr; }
    .nearby-search-controls { flex: 1 1 100%; }
    #nearbyCafeRadius { flex: 1; }
    .nearby-search-controls .btn { white-space: nowrap; }
    .poi-result { padding: 14px; gap: 10px; }
    .cafe-search-toolbar .btn { font-size: 12px; padding: 11px 13px; }
}

/* Map quality colors remain consistent across light and dark appearances. */
.cafe-map-marker, .cafe-map-marker.uploaded { border-color: var(--quality-color, #84908d); }
.cafe-map-marker .marker-score { background: var(--quality-color, #84908d); color: #fff; font-size: 12px; }
.map-quality-legend { margin-top: 18px; }
.legend-heading { font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.quality-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border-radius: 6px 6px 0 0; }
.quality-scale > div { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.quality-swatch { height: 12px; width: 100%; background: var(--quality-color); margin-bottom: 4px; }
.quality-scale strong { font-size: 11px; font-weight: 500; }
.quality-scale > div > span:last-child { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.legend-note { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin: 12px 0 0; }
.unrated-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #84908d; flex-shrink: 0; }

.poi-result.poi-added, .poi-result.poi-added:hover { border: 2px solid #22a66f; opacity: 1; cursor: default; }
.poi-result.poi-unadded, .poi-result.poi-unadded:hover { border: 2px solid #e75b65; }
.space-tag-options { display: flex; flex-wrap: wrap; gap: 8px; }
.space-tag[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
#addCafeForm input[readonly] { opacity: .75; }
#subjectiveScore { width: 100%; accent-color: var(--accent); }
.review-rating-control { padding: 16px; border-radius: 14px; background: var(--surface-soft); }
#reviewRatingValue { display: block; margin-bottom: 12px; font-size: 20px; font-weight: 650; color: var(--accent); }
#reviewRating { display: block; width: 100%; height: 28px; padding: 0; border: 0; background: transparent; appearance: none; -webkit-appearance: none; accent-color: var(--accent); cursor: pointer; }
#reviewRating::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(to right, #d98778, #d7ba76, #72ab90); }
#reviewRating::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border: 3px solid var(--accent); border-radius: 50%; background: var(--surface); box-shadow: 0 2px 6px #0003; }
#reviewRating::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(to right, #d98778, #d7ba76, #72ab90); }
#reviewRating::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid var(--accent); border-radius: 50%; background: var(--surface); }
.review-rating-scale { display: flex; justify-content: space-between; margin: 8px 0 14px; font-size: 12px; color: var(--muted); }

.review-list { display: grid; gap: 12px; margin: 14px 0; }
.review-entry { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.review-heading { display: flex; justify-content: space-between; gap: 12px; }
.review-heading time { color: var(--muted); font-size: 12px; }
.review-content { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; }
.review-rating { color: var(--accent); font-size: 13px; margin: 8px 0; }
.review-form { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.review-form textarea { width: 100%; resize: vertical; box-sizing: border-box; }
.subjective-panel { border: 1px solid var(--line); border-radius: 16px; }
.subjective-panel label { display: block; margin: 12px 0; }
.subjective-summary { font-size: 23px; font-weight: 650; color: var(--accent); margin: 18px 0; }
.clip-subjective { background: var(--surface-soft); padding: 16px; margin: 16px 0; }
.clip-subjective input[type="range"] { width: 100%; }
#discoverList .cafe > img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
@media(max-width: 640px) { #discoverList .cafe > img { height: 190px; min-height: 190px; } }

.review-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.review-photo-grid:empty { display: none; }
.review-photo-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; display: block; background: var(--surface-soft); }
.review-photo-grid figure { margin: 0; min-width: 0; }
.review-photo-grid .btn { width: 100%; font-size: 11px; margin-top: 6px; padding: 8px; }
@media(max-width: 640px) { .review-photo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.cafe-user-photos { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.cafe-user-photos img { width: 52px; height: 52px; min-height: 0; object-fit: cover; border-radius: 8px; }
.cafe-user-photos .note { font-size: 11px; }
