/* ============================================================
   Harbor Tycoon – Game Styles v1.1.0
   Fonts: Literata (headings) · Manrope (body)
   ============================================================ */

/* ── Reset / base ─────────────────────────────────────────── */
.ht-root *,
.ht-root *::before,
.ht-root *::after { box-sizing: border-box; margin: 0; padding: 0; }

.ht-root {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 14px;
    color: #1a2a1a;
    background: #0d1f2d;
    min-height: 100vh;
    position: relative;
}

/* ── Setup Screen ─────────────────────────────────────────── */
.ht-setup {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
    background:
        radial-gradient(ellipse at 30% 60%, rgba(13,80,120,0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0,66,0,0.3) 0%, transparent 50%),
        #0d1f2d;
}

.ht-setup__card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 40px 48px;
    width: 100%;
    max-width: 540px;
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.ht-setup__title {
    font-family: 'Literata', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #e8f4e8;
    text-align: center;
    margin-bottom: 28px;
}

.ht-setup-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 24px;
}

.ht-setup-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 20px 10px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}
.ht-setup-tab.active { color: #7dd3fc; border-bottom-color: #7dd3fc; }

.ht-setup-panel { display: none; }
.ht-setup-panel.active { display: block; }

.ht-form-row { margin-bottom: 18px; }
.ht-form-row label {
    display: block;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    margin-bottom: 6px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ht-form-row input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    color: #e8f4e8;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.ht-form-row input[type="text"]:focus {
    outline: none;
    border-color: #7dd3fc;
    background: rgba(255,255,255,0.12);
}

/* Vessel mix */
.ht-mix-note { color: rgba(255,255,255,0.45); font-size: 0.78rem; margin-bottom: 12px; }
.ht-mix-row  { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ht-mix-label { width: 140px; font-size: 0.85rem; color: rgba(255,255,255,0.7); flex-shrink: 0; }
.ht-mix-slider { flex: 1; accent-color: #7dd3fc; cursor: pointer; }
.ht-mix-val   { width: 36px; text-align: right; color: #7dd3fc; font-weight: 600; font-size: 0.9rem; }
.ht-mix-total-row { margin-top: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.55); text-align: right; }
#ht-mix-total.ht-over  { color: #f87171; }
#ht-mix-total.ht-exact { color: #4ade80; }

/* ── Buttons ──────────────────────────────────────────────── */
.ht-btn {
    display: inline-flex; align-items: center; gap: 5px;
    border: none; border-radius: 8px;
    font-family: 'Manrope', sans-serif; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s, transform 0.1s;
}
.ht-btn:active          { transform: scale(0.97); }
.ht-btn:disabled        { opacity: 0.4; cursor: not-allowed; transform: none; }
.ht-btn--primary        { background: #1d6f3c; color: #fff; padding: 12px 28px; font-size: 1rem; }
.ht-btn--primary:hover:not(:disabled) { background: #28944f; }
.ht-btn--secondary      { background: rgba(255,255,255,0.12); color: #e8f4e8; padding: 10px 22px; }
.ht-btn--secondary:hover { background: rgba(255,255,255,0.2); }
.ht-btn--sm             { padding: 6px 12px; font-size: 0.8rem; border-radius: 6px; }
.ht-btn--lg             { width: 100%; justify-content: center; margin-top: 8px; }
.ht-btn--warn           { background: #78350f; color: #fcd34d; }
.ht-btn--warn:hover:not(:disabled)    { background: #92400e; }
.ht-btn--success        { background: #166534; color: #86efac; }
.ht-btn--success:hover:not(:disabled) { background: #15803d; }
.ht-btn--info           { background: #1e3a5f; color: #93c5fd; }
.ht-btn--info:hover:not(:disabled)    { background: #1d4ed8; }
.ht-btn--ghost { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.12); }
.ht-btn--ghost:hover { background: rgba(255,255,255,0.13); color: #e8f4e8; }
.ht-btn--support        { background: #5b21b6; color: #e9d5ff; }
.ht-btn--support:hover  { background: #6d28d9; }

/* ── HUD ──────────────────────────────────────────────────── */
.ht-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.55);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 8px 16px;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}
.ht-hud__harbor-name { font-family: 'Literata', serif; font-weight: 700; font-size: 1rem; color: #e8f4e8; }
.ht-hud__time        { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-left: 8px; }
.ht-hud__scores      { display: flex; gap: 20px; align-items: center; }
.ht-score            { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; }
.ht-score__label     { color: rgba(255,255,255,0.55); }
.ht-score__val       { font-weight: 700; color: #fff; min-width: 28px; }
.ht-bar-wrap { width: 60px; height: 8px; background: rgba(255,255,255,0.12); border-radius: 4px; overflow: hidden; }
.ht-bar      { height: 100%; border-radius: 4px; transition: width 0.4s ease, background 0.4s ease; }
.ht-bar--pop { background: #34d399; }
.ht-bar--rep { background: #facc15; }
.ht-hud__rates { display: flex; flex-direction: column; gap: 2px; font-size: 0.72rem; color: rgba(255,255,255,0.5); text-align: right; }
.ht-hud__rates strong { color: rgba(255,255,255,0.85); }

/* ── Action bar ───────────────────────────────────────────── */
.ht-actions {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 16px;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 12px; flex-wrap: wrap;
    position: relative; z-index: 10;
}
.ht-actions__left,
.ht-actions__center,
.ht-actions__right { display: flex; align-items: center; gap: 8px; }

.ht-speed-label { font-size: 0.75rem; color: rgba(255,255,255,0.45); }

/* Speed buttons with tooltip */
.ht-speed-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    width: 36px; height: 28px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.ht-speed-btn.active,
.ht-speed-btn:hover { background: rgba(125,211,252,0.2); color: #7dd3fc; border-color: #7dd3fc; }

/* Tooltip */
.ht-speed-btn::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #e8f4e8;
    font-size: 0.7rem;
    font-family: 'Manrope', sans-serif;
    white-space: nowrap;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
}
.ht-speed-btn:hover::after { opacity: 1; }

/* ── Canvas ───────────────────────────────────────────────── */
.ht-canvas-wrap {
    position: relative;
    overflow: hidden;
    background: #0a1628;
}
#ht-canvas { display: block; width: 100%; }

/* ── Queue tray ───────────────────────────────────────────── */
.ht-queue-tray {
    display: flex; align-items: center;
    background: rgba(0,0,0,0.45);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 8px 16px;
    gap: 12px; min-height: 80px;
    overflow-x: auto;
    position: relative; z-index: 10;
}
.ht-queue-tray__label {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: rgba(255,255,255,0.35);
    writing-mode: vertical-rl; transform: rotate(180deg); flex-shrink: 0;
}
.ht-queue-list { display: flex; gap: 10px; align-items: center; }

.ht-queue-chip {
    display: flex; flex-direction: column; align-items: center;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 8px 12px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-width: 70px; position: relative;
}
.ht-queue-chip:hover,
.ht-queue-chip.selected { background: rgba(125,211,252,0.15); border-color: #7dd3fc; }
.ht-queue-chip.emergency { border-color: #f87171; animation: ht-pulse-red 1s infinite alternate; }

@keyframes ht-pulse-red {
    from { box-shadow: 0 0 0 0 rgba(248,113,113,0.4); }
    to   { box-shadow: 0 0 0 6px rgba(248,113,113,0); }
}

.ht-chip-icon { font-size: 1.4rem; line-height: 1; }
.ht-chip-type { font-size: 0.65rem; color: rgba(255,255,255,0.45); margin-top: 2px; }
.ht-chip-loa  { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.7); }
.ht-patience-bar {
    position: absolute; bottom: 4px; left: 8px; right: 8px;
    height: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; overflow: hidden;
}
.ht-patience-fill { height: 100%; background: #34d399; border-radius: 2px; transition: width 1s linear, background 0.5s; }
.ht-patience-fill.warn   { background: #facc15; }
.ht-patience-fill.urgent { background: #f87171; }

/* ── Event log ────────────────────────────────────────────── */
.ht-event-log {
    position: absolute;
    bottom: 90px;     /* above queue tray */
    right: 16px;
    width: 270px;
    max-height: 180px;
    z-index: 20;
    /* pointer-events must be ON so the scroll bar is usable */
    pointer-events: auto;
}
.ht-event-log__label {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: rgba(255,255,255,0.25); margin-bottom: 4px;
    pointer-events: none;
}
.ht-event-log__entries {
    overflow-y: auto;
    max-height: 160px;
    /* Custom thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.ht-event-log__entries::-webkit-scrollbar       { width: 4px; }
.ht-event-log__entries::-webkit-scrollbar-track  { background: transparent; }
.ht-event-log__entries::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.2); border-radius: 2px; }

.ht-event-entry {
    font-size: 0.75rem; color: rgba(255,255,255,0.65);
    background: rgba(0,0,0,0.5);
    border-left: 3px solid rgba(255,255,255,0.15);
    padding: 4px 8px; border-radius: 0 4px 4px 0;
    margin-bottom: 4px;
    animation: ht-fadein 0.3s ease;
}
.ht-event-entry.info    { border-left-color: #7dd3fc; }
.ht-event-entry.success { border-left-color: #4ade80; }
.ht-event-entry.warning { border-left-color: #facc15; }
.ht-event-entry.danger  { border-left-color: #f87171; }

@keyframes ht-fadein {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: none; }
}

/* ── Modals ───────────────────────────────────────────────── */
.ht-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.ht-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
}
.ht-modal__box {
    position: relative;
    background: #0f2235;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 32px 36px;
    max-width: 480px; width: 90%;
    max-height: 85vh; overflow-y: auto;
    z-index: 1;
    box-shadow: 0 32px 80px rgba(0,0,0,0.7);
}
.ht-modal__box--wide { max-width: 700px; }
.ht-modal__close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none;
    font-size: 1.1rem; color: rgba(255,255,255,0.4);
    cursor: pointer; transition: color 0.15s;
}
.ht-modal__close:hover { color: #fff; }
.ht-modal__box h2      { font-family: 'Literata', serif; color: #e8f4e8; margin-bottom: 18px; }

/* Help content */
.ht-modal__body h2, .ht-modal__body h3 { font-family: 'Literata', serif; color: #e8f4e8; margin: 18px 0 8px; }
.ht-modal__body p, .ht-modal__body li  { color: rgba(255,255,255,0.7); line-height: 1.7; margin-bottom: 8px; }
.ht-modal__body {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}.ht-modal__body ul { padding-left: 20px; }

/* Profile */
.ht-profile-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.ht-profile-table th,
.ht-profile-table td { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.9rem; }
.ht-profile-table th { color: rgba(255,255,255,0.45); font-weight: 500; width: 100px; }
.ht-profile-table td { color: #e8f4e8; font-weight: 600; }

.ht-profile-code-section label {
    display: block; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4); margin-bottom: 8px;
}
.ht-code-display {
    display: flex; align-items: center; gap: 10px;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 10px 14px;
}
.ht-code-display code { font-size: 1.1rem; letter-spacing: 3px; color: #7dd3fc; font-weight: 700; flex: 1; }
.ht-code-hint { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-top: 6px; }

/* Support prompt */
.ht-support-prompt {
    margin-top: 20px; padding: 14px 16px;
    background: rgba(91,33,182,0.15); border: 1px solid rgba(91,33,182,0.3);
    border-radius: 10px; text-align: center;
}
.ht-support-prompt p { color: rgba(255,255,255,0.65); font-size: 0.85rem; margin-bottom: 10px; }

/* Expand modal */
.ht-expand-budget { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 18px; }
.ht-expand-form   { margin-bottom: 16px; }
.ht-expand-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 10px; font-size: 0.9rem; color: rgba(255,255,255,0.7);
}
.ht-expand-row label { width: 120px; flex-shrink: 0; }
.ht-expand-row input[type="number"] {
    width: 70px; padding: 6px 8px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px; color: #e8f4e8; font-family: 'Manrope', sans-serif;
}
.ht-expand-row input[type="number"]::selection {
    background: rgba(125,211,252,0.35);
    color: #0d1f2d; /* dark text so it stays readable */
}

.ht-expand-row input[type="number"]::-moz-selection {
    background: rgba(125,211,252,0.35);
    color: #ffffff;
}
.ht-expand-row input[type="number"]:focus {
    outline: none;
    border-color: #7dd3fc;
    background: rgba(125,211,252,0.12);
}
.ht-expand-row span { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.ht-expand-cost { font-size: 0.95rem; color: rgba(255,255,255,0.55); margin-bottom: 16px; }
.ht-expand-cost strong { color: #facc15; font-size: 1.1rem; }

/* ── Construction overlay ─────────────────────────────────── */
.ht-construction {
    position: fixed; inset: 0; background: #000;
    z-index: 99999; display: flex; align-items: center; justify-content: center;
}
.ht-construction__inner { text-align: center; max-width: 360px; }
.ht-construction__title { font-family: 'Literata', serif; font-size: 1.5rem; color: #e8f4e8; margin-bottom: 24px; }
.ht-progress-bar { width: 100%; height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; margin-bottom: 12px; }
.ht-progress-fill { height: 100%; background: linear-gradient(90deg, #1d6f3c, #34d399); border-radius: 5px; transition: width 0.1s linear; width: 0; }
.ht-construction__sub { font-size: 0.85rem; color: rgba(255,255,255,0.4); }

/* ── Mobile gate ──────────────────────────────────────────── */
.ht-mobile-gate {
    position: fixed; inset: 0; background: #0d1f2d;
    z-index: 99998; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.ht-mobile-gate__inner { text-align: center; max-width: 320px; }
.ht-gate-icon { font-size: 48px !important; color: #7dd3fc; display: block; margin-bottom: 16px; }
.ht-mobile-gate__inner h2 { font-family: 'Literata', serif; color: #e8f4e8; margin-bottom: 16px; }
.ht-mobile-gate__message { color: rgba(255,255,255,0.6); font-size: 0.9rem; line-height: 1.6; margin-bottom: 24px; }

/* ── Error ────────────────────────────────────────────────── */
.ht-error { color: #f87171; font-size: 0.85rem; margin-top: 8px; }

/* ── Game layout: stack everything vertically ─────────────── */
.ht-game {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.ht-canvas-wrap { flex: 1 1 auto; position: relative; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .ht-setup__card       { padding: 28px 20px; }
    .ht-hud               { font-size: 0.7rem; }
    .ht-hud__rates        { display: none; }
    .ht-event-log         { display: none; }  /* too cramped on mobile */
}

/* ================================================================
   Phase 3 additions
================================================================ */

/* ── Money debt warning colours ───────────────────────────── */
.ht-money-warning  { color: #fcd34d !important; }
.ht-money-critical { color: #f87171 !important; animation: ht-blink 1s step-start infinite; }
@keyframes ht-blink { 50% { opacity: 0.4; } }

/* ── Dismiss button ───────────────────────────────────────── */
.ht-btn--dismiss {
    background: #166534;
    color: #86efac;
    border: 1px solid #4ade80;
    animation: ht-dismiss-pulse 1.2s ease-in-out infinite alternate;
}
.ht-btn--dismiss:hover { background: #15803d; }
@keyframes ht-dismiss-pulse {
    from { box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
    to   { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

/* ── Ready chip in queue tray ─────────────────────────────── */
.ht-queue-chip.ready {
    border-color: #4ade80;
    background: rgba(74,222,128,0.12);
}
.ht-patience-fill.ready { background: #4ade80; }

/* ── Repair alert strip ───────────────────────────────────── */
.ht-repair-alerts {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 30;
    pointer-events: none;
}

.ht-repair-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30,8,8,0.92);
    border: 1px solid rgba(239,68,68,0.6);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #fca5a5;
    pointer-events: auto;
    white-space: nowrap;
    animation: ht-fadein 0.3s ease;
}

.ht-repair-btn {
    background: #7f1d1d;
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.5);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.ht-repair-btn:hover { background: #991b1b; }

/* ── Leaderboard modal ────────────────────────────────────── */
.ht-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 4px;
}
.ht-leaderboard-table th {
    padding: 8px 10px;
    text-align: left;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.ht-leaderboard-table td {
    padding: 9px 10px;
    color: rgba(255,255,255,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ht-leaderboard-table tr.ht-lb-top td {
    color: #e8f4e8;
    font-weight: 600;
}
.ht-leaderboard-table tr:hover td {
    background: rgba(125,211,252,0.08);
}
.ht-leaderboard-table tr:last-child td {
    border-bottom: none;
}
.ht-lb-loading {
    text-align: center;
    color: rgba(255,255,255,0.35);
    padding: 24px 0 !important;
    font-style: italic;
}

/* ── Shore passenger label ────────────────────────────────── */
/* (drawn on canvas; no CSS needed) */

/* ── Canvas-wrap position context for repair alerts ──────── */
.ht-canvas-wrap { position: relative; }

/* ── Harbor Layout Screen ─────────────────────────────────── */
.ht-layout-card {
    max-width: 680px;
    padding: 28px 32px;
}
.ht-layout-intro {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    margin: 0 0 20px;
    text-align: center;
}
.ht-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}
@media (max-width: 560px) {
    .ht-layout-grid { grid-template-columns: 1fr; }
}
.ht-layout-section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #7ac8f0;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ht-layout-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.ht-layout-table th {
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ht-layout-table td {
    padding: 5px 6px;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}
.ht-layout-val { color: rgba(255,255,255,0.4); font-size:0.78rem; }
.ht-layout-btns { white-space: nowrap; }
.ht-layout-btns .ht-btn {
    padding: 2px 10px;
    font-size: 1rem;
    line-height: 1.4;
    min-width: 28px;
    margin: 0 2px;
}
.ht-layout-dock-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.ht-dock-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    min-width: 48px;
    text-align: center;
}
.ht-layout-dock-cost {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    margin: 0 0 4px;
}
.ht-layout-summary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 14px 18px;
    text-align: center;
    margin-bottom: 12px;
}
.ht-layout-cash-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
}
.ht-layout-cash-row strong {
    font-size: 1.4rem;
    color: #4ade80;
}
.ht-layout-cash-hint {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    margin: 6px 0 0;
}

/* ── Profile header with pencil ──────────────────────────── */
.ht-profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ht-profile-header h2 {
    margin: 0;
    flex: 1;
}
.ht-btn--icon {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.5);
    padding: 4px 8px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, border-color 0.15s;
}
.ht-btn--icon:hover {
    color: #7ac8f0;
    border-color: #7ac8f0;
}
#ht-edit-names-form label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 3px;
}
#ht-edit-names-form input[type="text"] {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.9rem;
    box-sizing: border-box;
}
#ht-edit-names-form input[type="text"]:focus {
    outline: none;
    border-color: #7ac8f0;
}

/* ── Copyright notice on setup screen ── */
.ht-setup__copyright {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.30);
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
    letter-spacing: 0.02em;
}

/* ── Donation modal ── */
.ht-donation-body p {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.ht-donation-steps {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.ht-donation-steps h3 {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
}
.ht-donation-steps ol {
    margin: 0;
    padding-left: 20px;
    color: rgba(255,255,255,0.80);
    font-size: 0.87rem;
    line-height: 1.7;
}
.ht-donor-code-box {
    background: rgba(91,33,182,0.18);
    border: 1px solid rgba(109,40,217,0.45);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.ht-donor-code-box label {
    display: block;
    font-size: 0.78rem;
    color: rgba(233,213,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
}
.ht-donation-cta {
    text-align: center;
    margin-bottom: 12px;
}
.ht-donation-thanks {
    text-align: center;
    color: #4ade80;
    font-size: 0.88rem;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.25);
    border-radius: 6px;
}

/* ── Unruly vessel queue chip indicator ── */
.ht-chip-unruly {
    font-size: 0.75rem;
    margin-right: 2px;
    opacity: 0.85;
}

/* ── Leaderboard tab buttons ── */
.ht-lb-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ht-lb-tab {
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}
.ht-lb-tab--active,
.ht-lb-tab:hover {
    opacity: 1;
}
.ht-lb-tab--active {
    background: var(--ht-accent, #38bdf8);
    color: #fff;
    border-color: transparent;
}

/* ── Moorage-only chip tag (fish vessel without catch) ── */
.ht-chip-mooring {
    font-size: 0.7rem;
    margin-right: 2px;
    opacity: 0.75;
    color: rgba(147, 197, 253, 0.9);
}

/* ── Fix G: Contrast-safe hover for all modal table rows ── */
#ht-root .ht-modal table tr:hover td,
#ht-root .ht-modal table tr:hover th {
    background: rgba(125,211,252,0.08);
    color: inherit;
}
/* Ensure abstract float dialog rows also have safe hover */
#ht-root .ht-modal [data-slip-id]:hover {
    border-color: rgba(125,211,252,0.4) !important;
    background: rgba(125,211,252,0.10) !important;
}
/* Leaderboard row hover — reinforce over any WP admin bleed-through */
#ht-root .ht-leaderboard-table tr:hover td {
    background: rgba(125,211,252,0.08) !important;
    color: inherit;
}
/* Harbor design (new game layout screen) table row hover */
#ht-root .ht-layout-table tr:hover td {
    background: rgba(125,211,252,0.08);
    color: rgba(255,255,255,0.95);
}
