/* JoinLeaveMessages docs page. Builds on ../styles.css (shared theme). */
body.docs section { padding-block: 90px; }
.muted { color: var(--ink-3); }
main a:not(.btn):not(.crumb):not(.link) { color: var(--accent); }
main a:not(.btn):not(.crumb):not(.link):hover { color: var(--ink); }

/* hero */
.d-hero { padding-top: 120px !important; }
.crumb { display: inline-block; font-size: 11px; color: var(--ink-3); margin-bottom: 26px; transition: color .3s, transform .3s var(--ease); }
.crumb:hover { color: var(--ink); transform: translateX(-3px); }
.d-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 5vw; align-items: center; }
.d-title { display: flex; gap: 22px; align-items: center; margin-bottom: 24px; }
.d-title .eyebrow { margin-bottom: 8px; }
.d-title > div:last-child { min-width: 0; }
.d-title h1 { font-size: clamp(34px, 5vw, 76px); line-height: .95; letter-spacing: -.05em; font-weight: 700; }
.d-title h1 .serif { font-weight: 400; letter-spacing: -.02em; background: linear-gradient(90deg, var(--accent), var(--accent-2) 60%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.d-title .picon.big { width: 96px; height: 96px; }
.d-lead { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink-2); max-width: 48ch; margin-bottom: 22px; }
.d-lead b { color: var(--ink); }
.d-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.d-chips span { display: inline-flex; gap: 8px; align-items: baseline; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.d-chips i { font-style: normal; font-size: 10px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 22px 30px; margin-top: 54px; }
.d-stats div { display: flex; flex-direction: column; }
.d-stats b { font-size: clamp(24px, 2.8vw, 38px); letter-spacing: -.03em; }
.d-stats span { font-size: 12px; color: var(--ink-3); }

/* Minecraft-style screen used by the preview and the playground */
.mc-preview { padding: 14px; border-radius: 28px; }
.mc-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; font-family: var(--mono); background:
  linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.55)),
  linear-gradient(180deg, #6fa8ff 0%, #9cc7ff 46%, #6d9a3b 46.5%, #557c2c 62%, #6b4a2b 62.5%, #4f3620 100%); }
.mc-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 16px, transparent 16px 32px), repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 16px, transparent 16px 32px); pointer-events: none; }
.mc-title, .mc-subtitle { position: absolute; left: 0; right: 0; text-align: center; padding: 0 8%; text-shadow: 3px 3px 0 rgba(0,0,0,.35); z-index: 1; }
.mc-title { top: 27%; font-size: clamp(18px, 2.4vw, 32px); font-weight: 700; }
.mc-subtitle { top: 45%; font-size: clamp(11px, 1.2vw, 15px); }
.mc-preview .mc-title, .mc-preview .mc-subtitle { opacity: 0; }
.mc-title.show, .mc-subtitle.show { animation: mcTitle 3.4s ease forwards; }
@keyframes mcTitle { 0% { opacity: 0; transform: scale(1.06); } 10%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.mc-chat { position: absolute; left: 10px; bottom: 10px; right: 30%; display: flex; flex-direction: column; gap: 2px; z-index: 1; }
.mc-line { font-size: clamp(10.5px, 1vw, 13px); padding: 2px 6px; background: rgba(0,0,0,.45); text-shadow: 1.5px 1.5px 0 rgba(0,0,0,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: lnIn .4s var(--ease); }
.obf { filter: blur(1.5px); }
.mc-sound { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 8px; font-size: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; opacity: 0; z-index: 1; }
.mc-sound.show { animation: mcTitle 2.6s ease forwards; }
.wave { display: inline-flex; gap: 2px; align-items: center; height: 12px; }
.wave i { width: 2px; height: 100%; background: var(--accent-3); border-radius: 1px; animation: wave .7s ease-in-out infinite alternate; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; } .wave i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { from { transform: scaleY(.25); } }
.mc-caption { text-align: center; font-size: 10px; color: var(--ink-3); padding: 10px 0 2px; letter-spacing: .12em; }

/* section nav */
.toc-wrap { position: sticky; top: 84px; z-index: 40; display: flex; justify-content: center; padding: 0 16px; margin-top: -20px; pointer-events: none; }
.toc { pointer-events: auto; display: flex; gap: 2px; padding: 6px; border-radius: 999px; overflow-x: auto; max-width: 100%; scrollbar-width: none; font-size: 11.5px; }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; padding: 7px 12px; border-radius: 999px; color: var(--ink-3) !important; transition: color .25s, background .25s; }
.toc a:hover { color: var(--ink) !important; }
.toc a.active { color: var(--bg) !important; background: var(--ink); }

/* section heads */
.d-sec { scroll-margin-top: 140px; }
.d-head { margin-bottom: 34px; max-width: 70ch; }
.d-head h2 { font-size: clamp(34px, 4.8vw, 64px); max-width: none; }
.d-head > p:not(.eyebrow) { color: var(--ink-2); margin-top: 16px; }
.d-note { color: var(--ink-2); margin-top: 18px; font-size: 15px; }

/* install */
.d-steps { list-style: none; counter-reset: s; display: grid; gap: 10px; max-width: 760px; }
.d-steps li { counter-increment: s; position: relative; padding: 18px 20px 18px 66px; border-radius: 18px; background: rgba(255,255,255,.045); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); color: var(--ink-2); }
.d-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 20px; top: 18px; font: 600 13px var(--mono); color: var(--accent-3); }
.d-steps b { color: var(--ink); }
.d-callout { margin-top: 14px; max-width: 760px; padding: 14px 18px; border-radius: 16px; font-size: 15px; color: #ffe2a3; background: rgba(255,211,107,.07); box-shadow: inset 0 0 0 1px rgba(255,211,107,.22); }

/* playground */
.pg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; padding: 24px; }
.pg-fields { display: flex; flex-direction: column; gap: 12px; }
.pg-fields label { display: flex; flex-direction: column; gap: 6px; }
.pg-fields label span { font-size: 10.5px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.pg-fields input, .search { width: 100%; font-size: 14px; color: var(--ink); background: rgba(0,0,0,.25); border: 0; border-radius: 12px; padding: 12px 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); outline: none; transition: box-shadow .25s; }
.pg-fields input:focus, .search:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgba(124,196,255,.15); }
.pg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pg-side { display: flex; flex-direction: column; gap: 14px; }
.pg-side .mc-title, .pg-side .mc-subtitle { opacity: 1; }
.pg-codes { display: flex; flex-wrap: wrap; gap: 5px; }
.pg-codes button { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--mono); color: var(--ink-2); padding: 5px 8px; border: 0; border-radius: 8px; background: rgba(255,255,255,.06); cursor: pointer; transition: background .2s, color .2s; }
.pg-codes button:hover { background: rgba(255,255,255,.14); color: var(--ink); }
.pg-codes i { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.btn.copy { align-self: flex-start; border: 0; cursor: pointer; color: var(--ink); font-family: inherit; }

/* tables */
.d-table { padding: 6px; overflow-x: auto; }
.d-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.d-table th { text-align: left; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 12px 14px; }
.d-table td { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.06); color: var(--ink-2); vertical-align: top; }
.d-table tr { transition: background .2s; }
.d-table tbody tr:hover { background: rgba(255,255,255,.03); }
.d-table td:first-child { white-space: nowrap; }
.cmd .arg { color: var(--ink-3); }
.def code.mc { background: rgba(0,0,0,.3); color: inherit; white-space: normal; }
.tagpill { display: inline-block; font-size: 9.5px; padding: 3px 8px; border-radius: 999px; margin-left: 4px; background: rgba(181,156,255,.12); color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(181,156,255,.28); vertical-align: 1px; }
.tagpill.new { background: rgba(94,240,200,.12); color: var(--accent-3); box-shadow: inset 0 0 0 1px rgba(94,240,200,.3); }
.copy-mini { font-size: 10px; margin-left: 8px; padding: 3px 8px; border-radius: 7px; border: 0; cursor: pointer; color: var(--ink-3); background: rgba(255,255,255,.06); opacity: 0; transition: opacity .2s, color .2s; }
tr:hover .copy-mini, .ph:hover .copy-mini, .code-head .copy-mini, .copy-mini:focus-visible { opacity: 1; }
.copy-mini:hover { color: var(--ink); }

/* permission & placeholders */
.perm-cards, .ph-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.perm, .ph { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.perm code, .ph code { align-self: flex-start; font-size: 17px; padding: 6px 12px; }
.perm p, .ph p { color: var(--ink-2); }
.perm .mono { font-size: 11.5px; }
.ph { flex-direction: row; flex-wrap: wrap; align-items: center; align-content: flex-start; }
.ph p { flex-basis: 100%; }
@media (hover: none) { .copy-mini { opacity: 1; } }

/* menus */
.menu-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.menu-tabs button { border: 0; cursor: pointer; padding: 9px 15px; border-radius: 999px; font: 600 12px var(--mono); color: var(--ink-3); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: color .25s, background .25s; }
.menu-tabs button.active { color: var(--bg); background: var(--ink); }
.menu-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: stretch; }
.inv { padding: 16px; border-radius: 22px; }
.inv-title { font: 600 13px var(--mono); color: var(--ink-2); margin: 0 4px 12px; }
.inv-grid { display: grid; grid-template-columns: repeat(9, 52px); grid-template-rows: repeat(3, 52px); gap: 4px; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.35); box-shadow: inset 0 2px 8px rgba(0,0,0,.5); }
.slot { border-radius: 8px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.slot.filler { background: linear-gradient(135deg, rgba(90,98,104,.55), rgba(60,66,71,.55)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 0 0 3px rgba(0,0,0,.15); }
.slot.item { border: 0; cursor: pointer; display: grid; place-items: center; font-size: 24px; position: relative; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 45%, transparent), rgba(255,255,255,.05) 70%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); transition: transform .25s var(--ease), box-shadow .25s; }
.slot.item:hover, .slot.item.sel, .slot.item:focus-visible { transform: translateY(-3px) scale(1.06); box-shadow: inset 0 0 0 2px var(--c), 0 8px 20px -6px color-mix(in srgb, var(--c) 70%, transparent); outline: none; }
.slot .pane { width: 70%; height: 70%; border-radius: 4px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 90%, white), var(--c)); opacity: .85; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.inv-grid.pop .slot { animation: slotIn .45s var(--ease) both; animation-delay: calc(var(--i) * 14ms); }
@keyframes slotIn { from { opacity: 0; transform: scale(.6); } }
.inv-info { padding: 24px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.inv-info .mono { font-size: 11px; }
.inv-info h3 { font-size: 22px; }
.inv-info p { color: var(--ink-2); }
.prompt-flow { margin-top: 26px; max-width: 760px; }
.prompt-flow h3 { margin-bottom: 12px; }
.prompt-flow ol { padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.prompt-flow b { color: var(--ink); }

/* config file */
.code-block { margin-top: 16px; border-radius: 20px; overflow: hidden; }
.code-block summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; padding: 16px 20px; font-size: 12px; color: var(--ink-2); }
.code-block summary::-webkit-details-marker { display: none; }
.code-block summary span { color: var(--accent); }
.code-block[open] summary span { font-size: 0; } .code-block[open] summary span::after { content: "hide"; font-size: 12px; }
.code-head { display: flex; justify-content: flex-end; padding: 0 16px; }
.code-block pre { margin: 0; padding: 6px 20px 20px; overflow-x: auto; font: 12.5px/1.65 var(--mono); color: var(--ink-2); }

/* sounds */
.sound-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.sound-tools .search { max-width: 360px; }
.sound-tools .mono { font-size: 11px; flex: none; }
.sounds { max-height: 560px; overflow-y: auto; }
.sounds td { white-space: nowrap; }

/* languages */
.lang-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-chips span { padding: 14px 20px; border-radius: 18px; font-weight: 600; font-size: 16px; }
.lang-chips i { font-style: normal; font-size: 10px; color: var(--accent-3); margin-left: 6px; }

/* changelog */
.release { padding: 26px 28px; margin-bottom: 16px; }
.release header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.release h3 { font-size: 26px; }
.release ul { list-style: none; display: grid; gap: 10px; }
.release li { display: grid; grid-template-columns: 86px 1fr; gap: 12px; align-items: baseline; color: var(--ink-2); }
.release li > span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 3px 8px; border-radius: 999px; justify-self: start; }
.release li.new > span { color: var(--accent-3); background: rgba(94,240,200,.1); }
.release li.changed > span { color: var(--accent); background: rgba(124,196,255,.1); }
.release li.fixed > span { color: #ffd36b; background: rgba(255,211,107,.1); }

.release.soon { box-shadow: inset 0 0 0 1px rgba(181,156,255,.3), 0 20px 60px -20px rgba(0,0,0,.65); }
.soon-note { margin: -6px 0 16px; font-size: 14px; color: var(--accent-2); }

/* faq */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border-radius: 18px; padding: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 50px 18px 22px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--ink-2); }

/* responsive */
@media (max-width: 900px) {
  body.docs section { padding-block: 70px; }
  .d-hero-grid { grid-template-columns: 1fr; }
  .d-stats { grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
  .pg { grid-template-columns: 1fr; padding: 16px; }
  .menu-wrap { grid-template-columns: 1fr; }
  .inv { justify-self: center; padding: 10px; }
  .inv-grid { grid-template-columns: repeat(9, minmax(0, 32px)); grid-template-rows: repeat(3, 32px); gap: 3px; padding: 5px; }
  .slot.item { font-size: 16px; }
  .toc-wrap { top: 76px; }
  .release li { grid-template-columns: 1fr; gap: 4px; }
  .d-title .picon.big { width: 68px; height: 68px; }
  .d-title { align-items: flex-start; }
  .d-title h1 .serif { display: block; }
  .d-table { padding: 4px; }
  .d-table table, .d-table tbody, .d-table tr, .d-table td { display: block; width: 100%; }
  .d-table thead { display: none; }
  .d-table tr { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.07); }
  .d-table tbody tr:first-child { border-top: 0; }
  .d-table td { border: 0; padding: 3px 4px; white-space: normal !important; }
  .d-table td:first-child { font-weight: 600; }
  .sounds tr { display: flex; flex-wrap: wrap; gap: 4px; }
  .sounds td { width: auto; }
  .copy-mini { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-preview .mc-title, .mc-preview .mc-subtitle, .mc-sound { opacity: 1; }
}

/* item lore (grey text under the name in game) */
#invInfo .lore { color: #ff8a80; font-size: .82rem; line-height: 1.5; margin: .2rem 0 .5rem; }

/* long inline code (sound keys, commands) wraps instead of widening the page on phones */
main p code, main li code, .release li > p { overflow-wrap: anywhere; min-width: 0; white-space: normal; }
