/* ────────────────────────────────────────────
   The Grumpy Moogle Toolbox — styles.css
   ──────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;900&family=Crimson+Pro:ital,wght@0,300;0,400;1,300;1,400&display=swap');

/* ── Variables ── */
:root {
  --bg:         #070d1a;
  --surface:    #0c1628;
  --border:     rgba(90, 140, 255, 0.15);
  --blue:       #3a7bd5;
  --blue-light: #5a9bff;
  --blue-glow:  rgba(58, 123, 213, 0.35);
  --accent:     #7eb8ff;
  --text:       #c8d8f0;
  --muted:      #4a6080;
  --white:      #e8f0ff;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Crimson Pro', serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Starfield background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(160,200,255,0.5) 0%, transparent 0%),
    radial-gradient(1px 1px at 34% 72%, rgba(160,200,255,0.4) 0%, transparent 0%),
    radial-gradient(1.5px 1.5px at 55% 9%,  rgba(160,200,255,0.6) 0%, transparent 0%),
    radial-gradient(1px 1px at 78% 55%, rgba(160,200,255,0.3) 0%, transparent 0%),
    radial-gradient(1px 1px at 91% 28%, rgba(160,200,255,0.5) 0%, transparent 0%),
    radial-gradient(1px 1px at 6%  85%, rgba(160,200,255,0.3) 0%, transparent 0%),
    radial-gradient(1.5px 1.5px at 47% 47%, rgba(160,200,255,0.4) 0%, transparent 0%),
    radial-gradient(1px 1px at 23% 62%, rgba(160,200,255,0.35) 0%, transparent 0%),
    radial-gradient(1px 1px at 67% 83%, rgba(160,200,255,0.4) 0%, transparent 0%),
    radial-gradient(1px 1px at 88% 91%, rgba(160,200,255,0.3) 0%, transparent 0%);
  pointer-events: none;
  z-index: 0;
}

/* ── Glow orb ── */
.bg-orb {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(58,123,213,0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header ── */
header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--border);
  animation: reveal 0.6s ease 0.1s both;
}

.moogle-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  animation: bob 4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(90,155,255,0.6));
}

.site-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--white);
  letter-spacing: 0.06em;
  text-shadow: 0 0 40px var(--blue-glow), 0 2px 0 rgba(0,0,0,0.5);
  line-height: 1.1;
}

.site-title span { color: var(--blue-light); }

.site-subtitle {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Main / Grid ── */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: reveal 0.6s ease 0.3s both;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: reveal 0.6s ease both;
}

.card:nth-child(1) { animation-delay: 0.45s; }
.card:nth-child(2) { animation-delay: 0.55s; }
.card:nth-child(3) { animation-delay: 0.65s; }
.card:nth-child(4) { animation-delay: 0.75s; }

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58,123,213,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(90, 155, 255, 0.45);
  box-shadow:
    0 12px 40px rgba(0,0,0,0.5),
    0 0 0 1px rgba(90,155,255,0.1),
    0 0 30px var(--blue-glow);
}

.card:hover::before { opacity: 1; }

/* ── Card preview ── */
.card-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Decorative grid overlay */
.card-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(90,155,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90,155,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.card-preview-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  transition: transform 0.4s ease;
}

.card:hover .card-preview-inner { transform: scale(1.05); }

/* Preview themes — add your own for new tools */
.preview-love {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255,45,122,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(180,0,80,0.2) 0%, transparent 60%),
    linear-gradient(135deg, #1a0510 0%, #0c1628 100%);
}

.preview-height {
  background:
    radial-gradient(ellipse at 50% 80%, rgba(58,200,130,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 20%, rgba(58,123,213,0.2) 0%, transparent 50%),
    linear-gradient(135deg, #081a12 0%, #0c1628 100%);
}

/* Add more preview themes as needed:
.preview-mynewool {
  background: ...;
}
*/

.preview-formatter {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(58,123,213,0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 40%, rgba(90,200,180,0.2) 0%, transparent 50%),
    linear-gradient(135deg, #071220 0%, #0c1628 100%);
}

.preview-dante {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(200,30,30,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 30%, rgba(150,10,10,0.2) 0%, transparent 50%),
    linear-gradient(135deg, #1a0505 0%, #0a0608 100%);
}

.preview-bear {
  background:
    radial-gradient(ellipse at 40% 50%, rgba(120,80,255,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 25%, rgba(80,40,180,0.2) 0%, transparent 50%),
    linear-gradient(135deg, #0a0818 0%, #080a0f 100%);
}

.preview-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10,20,40,0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  backdrop-filter: blur(6px);
  z-index: 1;
}

/* ── Card body ── */
.card-body {
  padding: 1.4rem 1.5rem 1.5rem;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.card-footer {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-tag {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(58,123,213,0.1);
  border: 1px solid rgba(58,123,213,0.2);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.card-arrow {
  color: var(--blue-light);
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.card:hover .card-arrow { transform: translateX(4px); }

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
}

/* ── Animations ── */
@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ── Mobile ── */
@media (max-width: 500px) {
  header { padding: 2.5rem 1.2rem 2rem; }
  main   { padding: 2rem 1rem 4rem; }
  .grid  { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════
   Tool pages — shared layout
   ════════════════════════════════════════════ */

body.tool-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.back-link {
  position: fixed;
  top: 1.2rem;
  left: 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
  z-index: 10;
}
.back-link:hover { color: var(--blue-light); }

.tool-header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: none;
  padding: 0;
  animation: reveal 0.5s ease 0.1s both;
}

.tool-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--white);
  text-shadow: 0 0 30px var(--blue-glow);
}

.tool-subtitle {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.3rem;
}

.tool-footer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--muted);
  opacity: 0.5;
  text-align: center;
  border-top: none;
  padding: 0;
}


/* ════════════════════════════════════════════
   Height Calculator
   ════════════════════════════════════════════ */

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(58,123,213,0.1);
  animation: reveal 0.5s ease 0.25s both;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1.75rem;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 8px 6px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: 'Crimson Pro', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: var(--surface2, #111e35);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* Sections */
.section { display: none; }
.section.active { display: block; }

.field-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}

.input-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-group label {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

input {
  width: 120px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1.4rem;
  font-family: 'Crimson Pro', serif;
  font-weight: 400;
  color: var(--white);
  background: rgba(58,123,213,0.06);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button { -webkit-appearance: none; }

input::placeholder { color: var(--muted); opacity: 0.5; }

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(58,123,213,0.2);
}

input.error { border-color: #e05c7a; }

.unit {
  font-size: 1rem;
  color: var(--muted);
  font-style: italic;
  padding-bottom: 12px;
}

/* Result box */
.result-box {
  background: rgba(58,123,213,0.07);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.result-box::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(58,123,213,0.2), transparent 70%);
  pointer-events: none;
}

.result-main {
  font-family: 'Cinzel', serif;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1;
  text-shadow: 0 0 20px var(--blue-glow);
}

.result-sub {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--blue-light);
  margin-top: 8px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* Decimal row */
.dec-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dec-label {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
}

.dec-btn {
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: 'Crimson Pro', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.dec-btn.active {
  background: rgba(58,123,213,0.12);
  color: var(--accent);
  border-color: var(--blue);
  font-weight: 600;
}

@media (max-width: 400px) {
  .tool-card { padding: 1.4rem 1rem; border-radius: 14px; }
  input { width: 90px; font-size: 1.2rem; }
}


/* ════════════════════════════════════════════
   Formatter & Preview
   ════════════════════════════════════════════ */

body.formatter-page {
  justify-content: flex-start;
  align-items: center;
  padding: 0;
}

body.formatter-page .tool-header {
  width: 100%;
  text-align: center;
  padding: 3rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  animation: reveal 0.5s ease 0.1s both;
}

.fmt-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
  gap: 0.85rem;
  animation: reveal 0.5s ease 0.2s both;
}

/* ── Mode tabs ── */
.fmt-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}

.fmt-tab {
  padding: 0.5rem 1.4rem;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.fmt-tab.active {
  background: rgba(58,123,213,0.18);
  color: var(--blue-light);
  box-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* ── Toolbar ── */
.fmt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
}

.fmt-tb-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-family: 'Crimson Pro', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  min-width: 32px;
  text-align: center;
}

.fmt-tb-btn:hover {
  background: rgba(58,123,213,0.12);
  border-color: var(--blue);
  color: var(--blue-light);
}

.fmt-tb-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ── Editor / Preview body ── */
.fmt-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 380px;
}

.fmt-editor-col,
.fmt-preview-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fmt-col-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fmt-preview-note {
  font-style: italic;
  font-family: 'Crimson Pro', serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  color: rgba(74,96,128,0.6);
}

.fmt-editor {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  line-height: 1.7;
  padding: 1.2rem;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 520px;
  text-transform: none;
  font-variant: none;
}

.fmt-editor:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(58,123,213,0.15);
}

.fmt-preview-box {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  overflow-y: auto;
  min-height: 520px;
  color: var(--text);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.75;
  text-transform: none;
  font-variant: none;
}

.fmt-preview-box * {
  text-transform: none;
  font-variant: none;
  font-family: inherit;
}

/* Preview content styling */
.fmt-preview-box h1,
.fmt-preview-box h2,
.fmt-preview-box h3 {
  font-family: 'Cinzel', serif;
  color: var(--white);
  margin: 1rem 0 0.5rem;
  letter-spacing: 0.03em;
}
.fmt-preview-box h1 { font-size: 1.6rem; }
.fmt-preview-box h2 { font-size: 1.25rem; }
.fmt-preview-box h3 { font-size: 1rem; }

.fmt-preview-box p { margin-bottom: 0.75rem; }

.fmt-preview-box a {
  color: var(--blue-light);
  text-decoration: underline;
  text-decoration-color: rgba(90,155,255,0.4);
}

.fmt-preview-box code {
  font-family: 'Courier New', monospace;
  background: rgba(58,123,213,0.1);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 0.85em;
  color: var(--accent);
}

.fmt-preview-box pre,
.bb-code {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0.75rem 0;
}

.fmt-preview-box ul,
.fmt-preview-box ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.fmt-preview-box blockquote,
.bb-quote {
  border-left: 3px solid var(--blue);
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  background: rgba(58,123,213,0.06);
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-style: italic;
}

.bb-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--blue-light);
  margin-bottom: 0.3rem;
}

.bb-spoiler {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  background: rgba(58,123,213,0.05);
  margin: 0.5rem 0;
}

.bb-spoiler summary {
  cursor: pointer;
  color: var(--blue-light);
  font-size: 0.85rem;
  font-style: italic;
}

.fmt-preview-box hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.fmt-preview-box img {
  max-width: 100%;
  border-radius: 4px;
}

.fmt-preview-empty {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* ── Action bar ── */
.fmt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.fmt-btn {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.fmt-btn:hover {
  background: rgba(58,123,213,0.1);
  border-color: var(--blue);
  color: var(--blue-light);
}

.fmt-btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 2px 12px rgba(58,123,213,0.4);
}

.fmt-btn-primary:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
  color: white;
  box-shadow: 0 2px 20px rgba(90,155,255,0.5);
}

.fmt-btn-danger:hover {
  background: rgba(220,60,60,0.12);
  border-color: #dc3c3c;
  color: #f08080;
}

.fmt-charcount {
  margin-left: auto;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
}

/* ── Toast ── */
.fmt-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--blue);
  color: white;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(58,123,213,0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
}

.fmt-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile ── */
@media (max-width: 700px) {
  .fmt-body {
    grid-template-columns: 1fr;
  }
  .fmt-editor, .fmt-preview-box {
    min-height: 320px;
  }
  body.formatter-page .tool-header {
    padding: 2rem 1rem 1rem;
  }
  .fmt-wrap {
    padding: 1rem 1rem 2rem;
  }
  .fmt-charcount {
    margin-left: 0;
    width: 100%;
    text-align: right;
  }
}
