/* ===== Okey Helper · Metin2Community ===== */

:root {
  --bg: #0b0d14;
  --bg-2: #11141f;
  --panel: rgba(22, 26, 40, 0.82);
  --panel-border: rgba(255, 255, 255, 0.07);
  --text: #eef0f6;
  --muted: #8b91a8;
  --gold: #f5c542;
  --gold-2: #d99a1e;
  --silver: #c9d1e0;
  --bronze: #c98a4b;
  --accent: #6d7cff;
  --danger: #ff5c7a;
  --ok: #4ade80;

  --card-r: #e0433f;
  --card-r-2: #9c1f1c;
  --card-b: #3f7fe0;
  --card-b-2: #1d3f8f;
  --card-y: #f2c230;
  --card-y-2: #a8780a;

  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cinzel", "Inter", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* fundal */
.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(245, 197, 66, 0.14), transparent 60%),
    radial-gradient(800px 500px at 90% 10%, rgba(109, 124, 255, 0.14), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(224, 67, 63, 0.10), transparent 60%),
    var(--bg);
}
.fx-canvas {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  width: 100%; height: 100%;
}
body.no-fx .fx-canvas { display: none; }

/* ===== topbar ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(to bottom, rgba(11, 13, 20, 0.95), rgba(11, 13, 20, 0.7));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 46px; height: 46px; display: grid; place-items: center; filter: drop-shadow(0 0 10px rgba(90,170,255,0.45)); }
.brand-logo img { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: 0.02em; white-space: nowrap; }
.brand-accent { color: var(--gold); }
.brand-sub { font-size: 12px; color: var(--muted); }
.topbar-actions { display: flex; gap: 8px; }

/* ===== butoane ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.05); font-weight: 600; font-size: 15px;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
  user-select: none;
}
.btn:hover:not(:disabled) { background: rgba(255,255,255,0.09); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-icon { padding: 10px; width: 42px; height: 42px; border-radius: 12px; }
.btn-small { padding: 8px 12px; font-size: 13px; }
.btn-ghost { background: transparent; }
.btn-primary { background: linear-gradient(135deg, #6d7cff, #4f5fe6); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(109,124,255,0.35); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #7c8aff, #5a6aee); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: transparent; color: #1a1300;
  box-shadow: 0 6px 18px rgba(245,197,66,0.35); }
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); }
.btn-discord { background: #5865f2; border-color: transparent; color: #fff; padding: 10px 14px; }
.btn-discord:hover { background: #6a75f5; }
.btn-settings { padding: 10px 14px; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.btn-settings:hover { background: rgba(255,255,255,0.11); }
.btn-settings svg { transition: transform 0.4s ease; }
.btn-settings:hover svg { transform: rotate(60deg); }
@media (max-width: 480px) {
  .btn-discord span, .btn-settings span { display: none; }
  .btn-discord, .btn-settings { width: 42px; padding: 10px; }
}

/* ===== layout ===== */
.layout {
  display: grid; gap: 16px; padding: 16px;
  max-width: 1180px; margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; padding: 24px; gap: 20px; }
  .side { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 20px; }
}
.play { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 16px; }

.card-panel {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.panel-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); font-weight: 600; margin-bottom: 12px;
}

/* ===== scorebar ===== */
.scorebar { display: flex; align-items: center; gap: 16px; }
.scorebar-left { display: flex; flex-direction: column; min-width: 90px; }
.scorebar-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.score { font-family: var(--font-display); font-size: 44px; font-weight: 800; line-height: 1; color: var(--gold);
  text-shadow: 0 0 24px rgba(245,197,66,0.35); font-variant-numeric: tabular-nums; }
.score.bump { animation: bump 0.45s cubic-bezier(.2,1.6,.4,1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
body.no-fx .score.bump { animation: none; }
.scorebar-right { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.chest-badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); transition: all 0.3s; }
.chest-badge.chest-gold { color: var(--gold); border-color: rgba(245,197,66,0.4); background: rgba(245,197,66,0.1); box-shadow: 0 0 18px rgba(245,197,66,0.25); }
.chest-badge.chest-silver { color: var(--silver); border-color: rgba(201,209,224,0.4); background: rgba(201,209,224,0.08); }
.chest-badge.chest-bronze { color: var(--bronze); }
.progress-track { position: relative; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: visible; }
.progress-fill { height: 100%; border-radius: 999px; width: 0%;
  background: linear-gradient(90deg, var(--bronze), var(--silver) 70%, var(--gold));
  transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
body.no-fx .progress-fill { transition: none; }
.progress-mark { position: absolute; top: -3px; width: 2px; height: 14px; background: rgba(255,255,255,0.35); border-radius: 2px; }
.progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px;
  font-variant-numeric: tabular-nums; }
.progress-labels span:nth-child(2) { margin-left: auto; margin-right: 6%; }
.score-next { font-size: 13px; color: var(--muted); min-height: 16px; }

/* ===== sugestie ===== */
.suggestion {
  border-radius: var(--radius-s); padding: 12px 14px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(109,124,255,0.14), rgba(109,124,255,0.04));
  border: 1px solid rgba(109,124,255,0.35); position: relative; overflow: hidden;
}
.suggestion.is-discard { background: linear-gradient(135deg, rgba(255,92,122,0.14), rgba(255,92,122,0.04)); border-color: rgba(255,92,122,0.35); }
.suggestion.is-waiting { background: rgba(255,255,255,0.03); border-color: var(--panel-border); }
.suggestion-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.suggestion-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.suggestion-status { font-size: 11px; color: var(--muted); }
.suggestion-status.pending::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
  border: 2px solid var(--accent); border-top-color: transparent; animation: spin 0.8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.suggestion-status.exact { color: var(--ok); }
.suggestion-text { font-size: 17px; font-weight: 600; line-height: 1.35; }
.suggestion-odds { font-size: 13px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.auto-bar { position: relative; height: 22px; margin-top: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.auto-bar-fill { position: absolute; inset: 0; width: 0%; background: linear-gradient(90deg, var(--accent), #9aa5ff); }
.auto-bar-text { position: relative; display: block; text-align: center; font-size: 12px; font-weight: 600; line-height: 22px; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions-secondary { grid-column: 1 / -1; display: flex; gap: 10px; }
.actions-secondary .btn { flex: 1; }
.pick-info { margin-top: 10px; font-size: 13px; color: var(--muted); min-height: 16px; text-align: center; }
.pick-info strong { color: var(--text); }

/* ===== statistici ===== */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--panel-border); }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.stat-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat.gold .stat-value { color: var(--gold); }
.stat.silver .stat-value { color: var(--silver); }
.stat.bronze .stat-value { color: var(--bronze); }
.stats .btn { width: 100%; }

/* ===== ghid ===== */
.guide-body p { font-size: 13.5px; line-height: 1.55; color: #c9cddb; margin: 0 0 10px; }
.scoring { width: 100%; border-collapse: collapse; margin-top: 6px; }
.scoring td { padding: 6px 0; border-top: 1px solid var(--panel-border); font-size: 13px; font-weight: 600; }
.scoring td:last-child { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.mini-cards { display: inline-flex; gap: 4px; }
.mini-cards i { font-style: normal; width: 22px; height: 28px; border-radius: 4px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.mini-cards i.r { background: var(--card-r); } .mini-cards i.b { background: var(--card-b); } .mini-cards i.y { background: var(--card-y); color: #2b1d00; }

/* ===== footer ===== */
.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.footer .sep { margin: 0 8px; }

/* ===== modal ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,6,10,0.7); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(440px, 100%); background: #151928; border: 1px solid var(--panel-border);
  border-radius: 18px; padding: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  animation: modalin 0.25s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes modalin { from { transform: translateY(16px) scale(0.97); opacity: 0; } }
body.no-fx .modal-card { animation: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--panel-border); cursor: pointer; }
.setting-text { display: flex; flex-direction: column; gap: 2px; }
.setting-name { font-weight: 600; font-size: 15px; }
.setting-hint { font-size: 12px; color: var(--muted); }
.setting-range { flex-direction: column; align-items: stretch; }
.setting-range input[type="range"] { width: 100%; accent-color: var(--accent); margin-top: 6px; }
.setting-range[hidden] { display: none; }

.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-slider { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.12); transition: background 0.2s; }
.switch-slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

.lang-group { display: flex; gap: 6px; }
.lang-btn { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--panel-border); background: transparent; font-weight: 700; font-size: 13px; }
.lang-btn.active { background: var(--gold); color: #1a1300; border-color: transparent; }

.done-card { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.done-card h2 { margin: 0; font-family: var(--font-display); }
.done-card p { margin: 0; color: #c9cddb; line-height: 1.5; }
.done-chest { font-size: 64px; line-height: 1; animation: chestpop 0.6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes chestpop { from { transform: scale(0.3) rotate(-10deg); opacity: 0; } }
body.no-fx .done-chest { animation: none; }
.done-card .btn-gold { width: 100%; }

/* ===== toast ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: #1c2134; border: 1px solid var(--panel-border); color: var(--text); padding: 10px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; z-index: 120; transition: all 0.25s; box-shadow: var(--shadow);
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.btn-hub { padding: 10px 14px; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
@media (max-width: 560px) { .btn-hub span { display: none; } .btn-hub { width: 42px; padding: 10px; } }
.footer { display: flex; flex-direction: column; gap: 6px; }
.disclaimer { font-size: 11px; color: rgba(139,145,168,0.7); max-width: 720px; margin: 0 auto; line-height: 1.5; }

/* ===== logo editor ===== */
[hidden] { display: none !important; }
.hint { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.btn-hub { padding: 10px 14px; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
@media (max-width: 560px) { .btn-hub span { display: none; } .btn-hub { width: 42px; padding: 10px; } }
.footer { display: flex; flex-direction: column; gap: 6px; }
.disclaimer { font-size: 11px; color: rgba(139,145,168,0.7); max-width: 720px; margin: 0 auto; line-height: 1.5; }

.banner-logo { position: relative; padding: 34px 20px 26px; text-align: center; overflow: hidden;
  background: radial-gradient(60% 120% at 50% 0%, rgba(245,197,66,0.16), transparent 70%); }
.banner-logo::before { content: ""; position: absolute; inset: 0; opacity: 0.35; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px; mask-image: radial-gradient(60% 100% at 50% 0%, #000, transparent); }
.banner-text { position: relative; }
.banner-text h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 5vw, 42px); margin: 0 0 6px; letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffe8a3, #f5c542 55%, #c8891a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.banner-text p { margin: 0 auto; max-width: 640px; color: #c9cddb; font-size: 14.5px; line-height: 1.5; }

.logo-layout { grid-template-columns: 1fr; }
@media (min-width: 980px) { .logo-layout { grid-template-columns: 300px minmax(0, 1fr) 300px; } }
.col-left, .col-mid, .col-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* import */
.drop { position: relative; border: 2px dashed rgba(255,255,255,0.18); border-radius: 14px; padding: 22px 14px; text-align: center; cursor: pointer;
  background: rgba(0,0,0,0.2); transition: all 0.15s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(245,197,66,0.06); }
.drop-icon { font-size: 30px; }
.drop-title { font-weight: 700; font-size: 14px; }
.drop-hint { font-size: 12px; color: var(--muted); }
.drop.has-img .drop-icon { display: none; }
.src-preview { max-width: 100%; border-radius: 8px; margin-top: 8px; box-shadow: 0 6px 16px rgba(0,0,0,0.5); }
.fit-controls { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.field input[type="text"] { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.25); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.field input[type="text"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,197,66,0.2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input { flex: 1; accent-color: var(--gold); }
.range-row b { width: 44px; text-align: right; font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums; }
.seg2 { display: flex; gap: 4px; }
.seg-btn { flex: 1; padding: 8px 6px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.seg-btn.active { background: rgba(245,197,66,0.16); border-color: var(--gold); }
.fit-controls .btn-primary { width: 100%; margin-top: 4px; }

/* editor */
.editor-panel { border-color: rgba(245,197,66,0.18); }
.editor-wrap { display: flex; justify-content: center; background: rgba(0,0,0,0.3); border-radius: 12px; padding: 12px; border: 1px solid var(--panel-border); }
.editor { width: 100%; max-width: 480px; height: auto; aspect-ratio: 4 / 3; image-rendering: pixelated; border-radius: 6px; cursor: crosshair; touch-action: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); font-size: 13px; font-weight: 600; transition: all 0.15s; }
.tool i { font-style: normal; }
.tool:hover { background: rgba(255,255,255,0.09); }
.tool.active { background: rgba(245,197,66,0.18); border-color: var(--gold); }
.tool-actions { display: flex; gap: 6px; }
.ib { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--panel-border); background: rgba(255,255,255,0.05); font-size: 15px; transition: all 0.15s; }
.ib:hover { background: rgba(255,255,255,0.12); }
.ib.active { background: rgba(109,124,255,0.2); border-color: var(--accent); }
.ib.danger:hover { background: rgba(255,92,122,0.25); border-color: var(--danger); }
.color-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.color-pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; position: relative; }
.color-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch { width: 34px; height: 34px; border-radius: 9px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.palette { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.pal { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,0.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); transition: transform 0.1s; }
.pal:hover { transform: scale(1.2); }

/* preview */
.previews { display: flex; flex-direction: column; gap: 14px; }
.pv-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.pv-game { display: flex; flex-direction: column; gap: 6px; }
.pv-name-row { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: #d9dbe3; color: #1a1a1a; font-size: 12px; font-family: Tahoma, Verdana, sans-serif; }
.pv-name-row.dark { background: #1a1d29; color: #fff; }
.pv-name-row canvas { width: 16px; height: 12px; image-rendering: pixelated; }
.pv-guild { font-weight: 700; }
.pv-big-wrap { display: flex; justify-content: center; padding: 10px; background: rgba(0,0,0,0.25); border-radius: 10px; }
.pv-big-wrap canvas { image-rendering: pixelated; width: 160px; height: 120px; border-radius: 4px; }
.dl-panel .btn { width: 100%; margin-top: 8px; }
.btn-big { font-size: 15px; padding: 14px 18px; }

.seg-color { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.seg-color input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.mini-swatch { width: 14px; height: 14px; border-radius: 4px; background: #000; border: 1px solid rgba(255,255,255,0.5); flex-shrink: 0; }
.field-row .seg2 { flex-wrap: wrap; }
.text-tool { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--panel-border); }
.text-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.text-row input { padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.25); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; min-width: 0; }
.text-row select { padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: #1c2134; color: var(--text); font: inherit; font-size: 13px; }
.text-row input:focus, .text-row select:focus { outline: none; border-color: var(--gold); }
.text-tool small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
@media (max-width: 480px) { .text-row { grid-template-columns: 1fr 1fr; } .text-row .btn { grid-column: 1 / -1; } }

/* credit */
.site-by { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }
.site-by span { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: 0.06em;
  background: linear-gradient(90deg, #f5c542, #ffe38a 45%, #d99a1e); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 0 8px rgba(245,197,66,0.35)); }

.footer-links { margin-top: 10px; font-size: 12.5px; }
.footer-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--gold); }
