:root{
  --bg:#131319;
  --bg-2:#191a22;
  --surface:#1e202a;
  --surface-hover:#262836;
  --rule: rgba(238,232,216,0.09);
  --rule-strong: rgba(238,232,216,0.16);
  --ink:#eee8d8;
  --ink-dim:#b9b3a0;
  --muted:#7e8096;
  --brass:#c9a227;
  --brass-bright:#e8c458;
  --brass-dim: rgba(201,162,39,0.14);
  --paper:#f2ead6;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}
*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  background: radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(201,162,39,0.10), transparent), var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  min-height:100vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
::selection{ background: var(--brass); color:#14151a; }

/* ---------- header ---------- */
header{
  position: sticky;
  top:0;
  z-index: 40;
  background: rgba(19,19,25,0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 20px;
}
.brand{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size: 20px;
  letter-spacing: 0.01em;
  white-space:nowrap;
}
.brand .mark{ color: var(--brass); }
.brand-cycle{
  font-family:'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  min-width: 90px;
}
.count-pill{
  font-family:'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--brass-bright);
  border:1px solid var(--rule-strong);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--brass-dim);
}

/* ---------- hero ---------- */
.hero{
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 28px;
}
.eyebrow{
  font-family:'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom: 18px;
}
.eyebrow::before{
  content:"";
  width: 26px; height:1px;
  background: var(--brass);
  display:inline-block;
}
h1.title{
  font-family:'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.04;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
h1.title em{
  font-style: italic;
  font-weight:500;
  color: var(--brass-bright);
}
.sub{
  color: var(--ink-dim);
  font-size: 16px;
  max-width: 560px;
  line-height: 1.6;
  margin: 0 0 34px;
}

/* live specimen strip */
.specimen{
  border:1px solid var(--rule-strong);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
}
.specimen::before{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(500px 200px at 10% 0%, var(--brass-dim), transparent 60%);
  pointer-events:none;
}
.specimen-label{
  font-family:'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display:flex;
  justify-content:space-between;
  margin-bottom: 12px;
}
.specimen-text{
  font-family:'Fraunces', serif;
  font-size: clamp(26px, 4vw, 40px);
  min-height: 54px;
  display:flex;
  align-items:center;
  word-break: break-word;
  transition: opacity 0.25s ease;
}

/* ---------- controls ---------- */
.controls{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 18px;
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items:center;
}
.input-wrap{
  flex: 1 1 320px;
  position:relative;
}
.input-wrap input, .search-wrap input{
  width:100%;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family:'Inter', sans-serif;
  font-size: 15px;
  padding: 13px 16px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.input-wrap input::placeholder, .search-wrap input::placeholder{ color: var(--muted); }
.input-wrap input:focus, .search-wrap input:focus{
  border-color: var(--brass);
  background: var(--surface-hover);
}
.search-wrap{ flex: 0 1 260px; }
.select-wrap{
  flex: 0 1 200px;
  position:relative;
}
.select-wrap select{
  width:100%;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family:'Inter', sans-serif;
  font-size: 15px;
  padding: 13px 36px 13px 16px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.select-wrap select:focus{
  border-color: var(--brass);
  background: var(--surface-hover);
}
.select-wrap::after{
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-top-color: var(--muted);
  pointer-events: none;
}
.chips{
  display:flex;
  gap:8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.chip{
  font-family:'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-dim);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 999px;
  cursor:pointer;
  transition: all 0.15s ease;
}
.chip:hover{ border-color: var(--brass); color: var(--brass-bright); }

/* ---------- grid ---------- */
main{
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px 60px;
}
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}
.card{
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 16px 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  min-height: 118px;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
  cursor: pointer;
  position:relative;
}
.card:hover{
  border-color: var(--rule-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 8px;
}
.card-index{
  font-family:'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.card-name{
  font-family:'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--brass);
  text-align: right;
  letter-spacing: 0.02em;
  max-width: 68%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.card-text{
  font-size: 19px;
  line-height: 1.5;
  word-break: break-word;
  flex:1;
  color: var(--ink);
}
.card-bottom{
  display:flex;
  justify-content:flex-end;
}
.copy-btn{
  display:flex;
  align-items:center;
  gap: 6px;
  font-family:'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule-strong);
  padding: 5px 10px;
  border-radius: 7px;
  transition: all 0.15s ease;
}
.card:hover .copy-btn{ color: var(--ink-dim); border-color: var(--rule-strong); }
.card.copied .copy-btn{ color: #14151a; background: var(--brass-bright); border-color: var(--brass-bright); }
.copy-btn svg{ width:12px; height:12px; }

.empty-state{
  grid-column: 1 / -1;
  text-align:center;
  padding: 60px 20px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.load-more-wrap{
  display:flex;
  justify-content:center;
  margin-top: 30px;
}
.load-more{
  font-family:'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  padding: 12px 26px;
  border-radius: 999px;
  cursor:pointer;
  transition: all 0.15s ease;
}
.load-more:hover{ border-color: var(--brass); color: var(--brass-bright); background: var(--surface-hover); }

footer{
  text-align:center;
  padding: 30px 20px 50px;
  color: var(--muted);
  font-family:'JetBrains Mono', monospace;
  font-size: 12px;
  border-top: 1px solid var(--rule);
}

/* toast */
#toast{
  position: fixed;
  left:50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--brass-bright);
  color: #14151a;
  font-family:'JetBrains Mono', monospace;
  font-weight:600;
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events:none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  white-space: nowrap;
  max-width: 80vw;
  overflow:hidden;
  text-overflow: ellipsis;
}
#toast.show{ opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px){
  .header-inner{ flex-wrap: wrap; }
  .brand-cycle{ display:none; }
  .specimen{ padding: 20px 18px; }
}

/* ---------- Special Effect Font Styles ---------- */

/* ✦ Retro Neon — chromatic red/blue shadow like screenshot 1 */
.font-effect-neon .card-text,
.font-effect-neon #specimenText {
  font-family: 'Russo One', 'Impact', sans-serif;
  color: #f5f0e8;
  text-shadow:
    -3px 0 2px rgba(255, 30, 30, 0.85),
     3px 0 2px rgba(30, 80, 255, 0.85),
     0 0 8px rgba(255,255,255,0.2);
  letter-spacing: 0.04em;
}

/* ▦ Boxed Typewriter — each letter in a square box like screenshot 2 */
.font-effect-boxed .card-text,
.font-effect-boxed #specimenText {
  font-family: 'VT323', 'Special Elite', monospace;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  letter-spacing: 0;
  font-size: 22px;
}
.font-effect-boxed .card-text .letter-box,
.font-effect-boxed #specimenText .letter-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border: 1.5px solid rgba(238,232,216,0.55);
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  line-height: 1;
}

/* 𝔊 Gothic Blackletter — old English blackletter like screenshot 3 */
.font-effect-gothic .card-text,
.font-effect-gothic #specimenText {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* ⊙ Bubble Circle — each letter in a circle like screenshot 4 */
.font-effect-bubble .card-text,
.font-effect-bubble #specimenText {
  font-family: 'Josefin Sans', sans-serif;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  letter-spacing: 0;
  font-size: 18px;
  font-weight: 700;
}
.font-effect-bubble .card-text .letter-box,
.font-effect-bubble #specimenText .letter-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border: 2px solid rgba(238,232,216,0.6);
  border-radius: 50%;
  padding: 2px;
  color: var(--ink);
  background: rgba(255,255,255,0.03);
  line-height: 1;
}

