@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #4e342e;
    --accent: #c6a664;
    --bg-color: #fdfaf7;
    --text-color: #2b1d1a;
    --text-muted: #8d6e63;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --bg-image: url('images/bg_light.png');
    --nav-bg: #fdfaf7;
    color-scheme: light;
}

.dark-mode {
    --primary: #d4af37;
    --accent: #c6a664;
    --bg-color: #1a0f0d;
    --text-color: #fdfaf7;
    --text-muted: #a1887f;
    --glass-bg: rgba(26, 15, 13, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --bg-image: url('images/bg_dark.png');
    --nav-bg: #1a0f0d;
    color-scheme: dark;
}

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

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-color);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100svh;
}

#app-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    margin: 0;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

#splash {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top, rgba(198,166,100,0.12), transparent 20%),
                linear-gradient(180deg, rgba(33, 22, 18, 0.96), rgba(33, 22, 18, 0.88));
    color: var(--text-color);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000; transition: opacity 0.8s ease, visibility 0.8s ease;
}

#splash.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 40px 30px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 32px;
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}

.splash-circle {
    position: absolute;
    top: 50%; left: 50%;
    width: 280px; height: 280px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(198,166,100,0.14), transparent 65%);
    filter: blur(20px);
    z-index: -1;
}

.bean {
    font-size: 4.5rem;
    animation: floatBean 2.5s ease-in-out infinite;
}

@keyframes floatBean {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(8deg); }
}

.splash-logo {
    margin-top: 0;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    letter-spacing: 5px;
    font-weight: 800;
    text-transform: uppercase;
}

.splash-copy {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.08em;
    text-align: center;
    max-width: 240px;
}

.splash-icon {
    font-size: 5rem;
    animation: spinCup 2.2s linear 1;
    animation-fill-mode: forwards;
}

.loading-text {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.88);
    letter-spacing: 0.08em;
    font-weight: 600;
}

.loading-dot {
    display: inline-block;
    opacity: 0.25;
    animation: dotPulse 1s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes spinCup {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 1; }
}

.splash-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

@media (max-width: 520px) {
    .splash-content {
        width: calc(100% - 40px);
        padding: 30px 20px;
    }

    .splash-logo { font-size: 1.7rem; }
}

.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background-color: var(--nav-bg);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
    border-top: 1px solid var(--glass-border);
    box-sizing: border-box;
}

.tab-bar-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 48px;
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    height: 100%;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.65rem;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: 0.3s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.tab-btn.active {
    color: var(--accent);
}

.tab-btn i,
.tab-btn svg {
    display: block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.tab-btn span {
    display: block;
    line-height: 1;
}

.view-content {
    padding: 16px 16px 24px;
    max-width: 600px;
    margin: 0 auto;
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-guide {
    padding-top: 72px;
}

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 15px 20px;
    padding-top: calc(env(safe-area-inset-top) + 15px);
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 0 0 20px 20px;
}

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

.header-area {
    margin-bottom: 16px;
}
.greet { font-size: 0.85rem; color: var(--text-muted); font-weight: 300; }
.hero-title { font-size: 1.7rem; margin-top: 4px; color: var(--text-color); }

.card-hero {
    padding: 16px;
    margin-bottom: 14px;
}

.home-flow {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.home-flow .btn-primary,
.home-flow .btn-secondary {
    flex: 1;
}

.pref-waiting-text {
    margin: 10px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.bean-shelf-title {
    font-size: 0.95rem;
    margin: 0 0 10px;
}

.bean-shelf-card {
    padding: 0;
    margin-bottom: 8px;
}

.bean-shelf-card .item-side {
    flex-direction: row;
    align-items: center;
}

.item-edit {
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

#bean-shelf {
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.preference-card {
    padding: 16px;
    margin-bottom: 14px;
}

.preference-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.pref-accordion-card {
    border-radius: 24px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.dark-mode .pref-accordion-card {
    background: rgba(255, 255, 255, 0.08);
}

.pref-accordion-header {
    width: 100%;
    padding: 18px;
    border: none;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.pref-accordion-header:hover {
    background: rgba(198, 166, 100, 0.08);
}

.accordion-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(198, 166, 100, 0.12);
    color: var(--accent);
    font-weight: 700;
}

.pref-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
}

.pref-accordion-body.open {
    padding: 18px;
    max-height: 320px;
}

.pref-body-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pref-rank-list,
.pref-taste-list,
.pref-recent-list {
    display: grid;
    gap: 10px;
}

.pref-rank-item,
.pref-taste-row,
.pref-recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-color);
    font-size: 0.9rem;
}

.pref-rank-item:last-child,
.pref-taste-row:last-child,
.pref-recent-item:last-child {
    border-bottom: none;
}

.pref-rating-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(198, 166, 100, 0.16);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 760px) {
    .preference-items {
        grid-template-columns: 1fr;
    }
}

.stat-item {
    padding: 20px;
    text-align: center;
}
.stat-val { font-size: 1.5rem; font-weight: 600; color: var(--accent); }
.stat-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.item-card {
    margin-bottom: 20px;
    overflow: hidden;
    transition: 0.3s;
}

.item-head {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.item-info { flex: 1; }
.item-shop { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); font-weight: 600; }
.item-bean { font-size: 1.2rem; font-weight: 700; color: var(--text-color); margin-top: 4px; }
.item-brew { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }

.brew-finish-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    background: rgba(33, 22, 18, 0.55);
    padding: calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 16px);
}

.brew-finish-overlay.is-open {
    display: block;
}

.brew-finish-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

.brew-finish-head {
    text-align: center;
    margin-bottom: 12px;
}

.brew-finish-title {
    font-size: 1.25rem;
    margin: 0 0 6px;
}

.finish-recipe-line {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-muted);
    margin: 0;
}

.brew-finish-card .form-group {
    margin-bottom: 10px;
}

.brew-finish-card label {
    margin-bottom: 4px;
}

.brew-finish-card input,
.brew-finish-card select {
    padding: 8px 10px;
    font-size: 0.95rem;
}

.taste-scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.taste-row {
    display: grid;
    grid-template-columns: 3.6em 1fr;
    gap: 8px;
    align-items: center;
    font-size: 0.75rem;
}

.taste-steps {
    display: flex;
    gap: 4px;
}

.taste-step {
    flex: 1;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.taste-step.is-on {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-delete {
    border: 1px solid rgba(229, 115, 115, 0.45);
    background: transparent;
    color: #e57373;
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.finish-memo-group {
    margin-bottom: 0;
}

.brew-finish-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    background: var(--glass-bg);
}

.brew-finish-actions .btn-primary,
.brew-finish-actions .btn-secondary {
    flex: 1;
    width: auto;
    padding: 12px 8px;
    font-size: 0.85rem;
}

.item-chart-box {
    padding: 0 20px 20px 20px;
    display: none;
}

.empty-state {
    text-align: center;
    padding: 60px 40px;
}
.empty-icon { font-size: 4rem; opacity: 0.3; margin-bottom: 20px; }
.empty-text { color: var(--text-muted); font-style: italic; }

.timer-container {
    text-align: center;
    padding: 16px 12px;
}

.timer-circle-wrap {
    position: relative;
    width: min(220px, 70vw);
    height: min(220px, 70vw);
    margin: 0 auto 16px auto;
}

#view-timer.is-brewing .timer-setup {
    display: none;
}

#view-timer.is-brewing .timer-circle-wrap {
    width: min(240px, 72vw);
    height: min(240px, 72vw);
}

body.is-brewing .tab-bar {
    display: none;
}

.timer-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.timer-slice-bg,
.timer-slice-prog {
    fill: none;
    stroke-linecap: butt;
}

.timer-slice-prog {
    transition: stroke-dashoffset 0.3s linear, opacity 0.2s ease;
}

.timer-slice-wait.is-active {
    animation: waitPulse 1.2s ease-in-out infinite;
}

@keyframes waitPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.timer-circle-wrap.is-wait .timer-action {
    color: #8d9aa8;
}

.timer-circle-bg {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 10;
}

.timer-circle-prog {
    fill: none;
    stroke: var(--accent);
    stroke-width: 10;
    transition: stroke-dashoffset 0.3s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

.timer-pour-index {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.time-big,
.time-sub {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: -1px;
    color: var(--text-muted);
    margin-top: 4px;
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    max-width: 220px;
    margin: 0 auto;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
}

.timer-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.timer-meta-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 auto 18px auto;
    max-width: 320px;
    padding: 0 12px;
}

.timer-action {
    font-size: 1.15rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.timer-action.is-wait {
    color: #8d9aa8;
}

.timer-target {
    font-size: 1.35rem;
    color: var(--text-color);
    font-weight: 700;
}

.timer-scale-readout {
    width: 100%;
    padding: 12px 16px 14px;
    border-radius: 18px;
    background: rgba(198, 166, 100, 0.12);
    border: 1px solid var(--glass-border);
    box-sizing: border-box;
}

.timer-scale-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.timer-scale-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    line-height: 1;
    margin: 6px 0 2px;
}

#timer-scale-now {
    font-size: clamp(3.2rem, 14vw, 4.4rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: -0.04em;
    color: var(--accent);
}

.timer-scale-unit {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
}

.timer-scale-goal {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.timer-scale-hint {
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.timer-button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.form-group {
    margin-bottom: 14px;
}
label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
}
input, select, textarea {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-secondary.active-mode {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.install-gate {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9990;
    align-items: center;
    justify-content: center;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    background: rgba(43, 29, 26, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.install-gate.is-on { display: flex; }

.install-gate-card {
    width: min(400px, 100%);
    padding: 28px 22px 22px;
    text-align: center;
}

.install-gate-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.install-gate-card h2 {
    font-size: 1.25rem;
    margin: 0 0 10px;
    color: var(--primary);
    line-height: 1.35;
}

.install-gate-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 14px;
    line-height: 1.5;
    text-align: left;
}

.install-gate-card .install-steps {
    text-align: left;
    margin: 0 0 18px;
}

.install-gate-card .btn-primary,
.install-gate-card .btn-secondary {
    width: 100%;
}

.install-gate-card .btn-primary { margin-bottom: 8px; }

.install-hint {
    display: none;
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid var(--accent);
}

.install-hint.is-on { display: block; }

.install-hint h3 {
    font-size: 1rem;
    margin: 0 0 6px;
    color: var(--primary);
}

.install-hint p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.45;
}

.install-steps {
    margin: 0 0 12px;
    padding-left: 1.2em;
    font-size: 0.8rem;
    color: var(--text-color);
    line-height: 1.55;
}

.install-steps li { margin: 0 0 4px; }

#install-hint-settings .install-steps { margin-bottom: 0; }

#install-hint-settings.install-hint {
    margin-bottom: 0;
}

.settings-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 12px;
    line-height: 1.45;
}

.settings-legal {
    text-align: center;
    margin-top: 40px;
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.settings-legal a {
    color: var(--text-muted);
    text-decoration: underline;
}

a.bmc-tag {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #e0a800;
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

a.bmc-tag:hover {
    background: #c99200;
    color: #fff;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.float { animation: float 6s ease-in-out infinite; }

/* Hybrid Input UI (Ruler & Steppers) */
#view-timer .timer-setup:first-child {
    margin-bottom: 12px;
}

.input-hub {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.input-display-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stepper-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
    touch-action: manipulation;
}

.stepper-btn:active {
    background: var(--accent);
    color: white;
    transform: scale(0.95);
}

.hub-input-wrap {
    flex: 1;
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.hub-input-wrap input {
    width: 100%;
    margin-bottom: 0 !important;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 10px;
    background: transparent;
    border: none !important;
    color: var(--accent);
}

.ruler-container {
    display: none;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.ruler-scroll {
    height: 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: auto;
    mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
    cursor: pointer;
}

.ruler-scroll::-webkit-scrollbar { display: none; }

.ruler-content {
    height: 100%;
    background-image: 
        linear-gradient(to right, var(--glass-border) 1px, transparent 1px),
        linear-gradient(to right, var(--accent) 1px, transparent 1px);
    background-size: 10px 15px, 50px 25px;
    background-position: center bottom;
    background-repeat: repeat-x;
    padding: 0 50%;
}

.ruler-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    z-index: 5;
    pointer-events: none;
}