/* Telegram Emoji Maker (page-emoji.hbs). Same system as synthid.css: theme tokens from screen.css,
   mint ground, raised --base-2 cards with a hairline, Instrument Sans for UI, black pill buttons. */

.emj-page { --emj-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 14px 34px -22px rgba(0, 0, 0, .35); --emj-check: rgba(23, 32, 28, .07); }
.emj-lead { margin: 1rem auto 0; max-width: 64ch; font-family: var(--font-text); font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

.emj { max-width: 1080px; margin-inline: auto; padding-inline: var(--pad); box-sizing: content-box; }
.emj [hidden] { display: none !important; }
.emj svg { flex: none; }

.emj-card { background: var(--base-2); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line), var(--emj-shadow); }
.emj-layout { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 900px) { .emj-layout { grid-template-columns: 7fr 5fr; } }

.emj-panel { padding: 1rem; }
.emj-section-title { display: flex; align-items: center; gap: .55rem; margin: .15rem .15rem .85rem; font: 650 var(--fs-xs)/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.emj-step { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--ink-strong); color: #fff; font-size: .72rem; letter-spacing: 0; }

/* drop zone */
.emj-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    min-height: 420px; padding: 2rem 1.25rem; text-align: center; cursor: pointer;
    border: 1.5px dashed rgba(23, 32, 28, .22); border-radius: calc(var(--radius) - 4px);
    transition: border-color .15s, background-color .15s;
}
.emj-drop:hover, .emj-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.emj-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.emj-drop__icon { width: 56px; height: 56px; margin-bottom: .6rem; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.emj-drop__title { font-size: 1.125rem; font-weight: 650; color: var(--ink-strong); }
.emj-drop__sub { color: var(--ink-2); font-size: var(--fs-sm); }
.emj-drop__hint { margin-top: .7rem; font-size: var(--fs-xs); color: var(--ink-3); }

/* the article button: black pill */
.emj-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em; margin-top: .9rem; padding: .75rem 1.5rem;
    border: 0; border-radius: 999px; background: var(--ink-strong); color: #fff;
    font: 600 var(--fs-sm)/1.2 var(--font-ui); cursor: pointer; text-decoration: none;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); transition: transform .15s, box-shadow .15s;
}
.emj-btn:hover, .emj-drop:hover .emj-btn { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.emj-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.emj-btn--ghost { margin: 0; padding: .55rem 1.1rem; background: transparent; color: var(--ink-strong); box-shadow: inset 0 0 0 1.5px var(--line); }
.emj-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); transform: none; }
.emj-btn--wide { width: 100%; margin-top: 1.2rem; padding: .9rem 1.5rem; }

/* editor */
.emj-checker { background: repeating-conic-gradient(var(--emj-check) 0% 25%, #fff 0% 50%) 50% / 18px 18px; }
.emj-stage { position: relative; height: 420px; border-radius: calc(var(--radius) - 4px); overflow: hidden; }
@media (max-width: 560px) { .emj-stage { height: 330px; } .emj-drop { min-height: 300px; } }
.emj-stage img { display: block; max-width: 100%; }
.emj-stage .cropper-bg { background-image: none; }
.emj-stage .cropper-modal { background: #17201c; opacity: .42; }
.emj-stage .cropper-view-box { outline: 2px solid var(--accent); outline-color: var(--accent); }
.emj-stage .cropper-line, .emj-stage .cropper-point { background-color: var(--accent); }
.emj-stage .cropper-point { width: 10px; height: 10px; opacity: 1; border-radius: 50%; }
.emj-stage .cropper-point.point-se { width: 10px; height: 10px; }
.emj-busy { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.emj-busy__chip { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1rem; border-radius: 999px; background: var(--ink-strong); color: #fff; font: 600 var(--fs-sm)/1 var(--font-ui); box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .55); }
.emj-busy__chip .emj-spinner { border-color: #2fd3a5; border-right-color: transparent; }
.emj-spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: emj-spin .8s linear infinite; }
.emj-spinner--lg { width: 30px; height: 30px; border-width: 3px; }
@keyframes emj-spin { to { transform: rotate(360deg); } }

.emj-tools { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; margin-top: .9rem; }
.emj-tools__left { display: flex; align-items: center; gap: .5rem 1.2rem; flex-wrap: wrap; }
.emj-switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; font: 500 var(--fs-sm)/1.2 var(--font-ui); color: var(--ink-strong); }
.emj-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.emj-switch__track { position: relative; flex: none; width: 40px; height: 23px; border-radius: 999px; background: rgba(23, 32, 28, .2); transition: background-color .15s; }
.emj-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s; }
.emj-switch input:checked + .emj-switch__track { background: var(--accent); }
.emj-switch input:checked + .emj-switch__track::after { left: 20px; }
.emj-switch input:focus-visible + .emj-switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.emj-switch.is-disabled { cursor: default; color: var(--ink-3); }
.emj-switch.is-disabled .emj-switch__track { opacity: .5; }
.emj-linkbtn { border: 0; background: none; padding: 0; font: 600 var(--fs-sm)/1.2 var(--font-ui); color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.emj-linkbtn:hover { color: var(--accent-strong); }
.emj-hint { margin: .7rem 0 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-2); }

.emj-error { margin-top: .9rem; padding: .8rem 1rem; border-radius: var(--radius-sm); background: #f6e3da; color: #7d2a0f; font-size: var(--fs-sm); box-shadow: inset 3px 0 0 #b2401a; }
.emj-privacy { display: flex; align-items: center; justify-content: center; gap: .45rem; margin: .9rem 0 .1rem; font-size: var(--fs-xs); color: var(--ink-2); text-align: center; }

/* result column */
.emj-placeholder, .emj-loading { padding: 2.75rem 1.5rem; text-align: center; color: var(--ink-2); font-size: var(--fs-sm); }
.emj-placeholder { background: transparent; box-shadow: none; border: 1.5px dashed rgba(23, 32, 28, .18); }
.emj-placeholder b, .emj-loading b { display: block; margin-bottom: .25rem; color: var(--ink-strong); font-size: 1.0625rem; }
.emj-ph__icon { width: 52px; height: 52px; margin: 0 auto .8rem; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.emj-loading .emj-spinner { display: block; margin: 0 auto 1rem; }

.emj-result { padding: 1rem 1.1rem 1.2rem; }
.emj-result__top { display: flex; gap: 1.1rem; align-items: center; }
.emj-tile { width: 100px; height: 100px; flex: none; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.emj-tile canvas { display: block; width: 100px; height: 100px; }
.emj-result__meta h3 { margin: 0 0 .2rem; font: 650 1.125rem/1.2 var(--font-ui); color: var(--ink-strong); }
.emj-result__meta p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }

.emj-chat-label { margin: 1.3rem 0 .55rem; font: 650 var(--fs-xs)/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.emj-chats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.emj-chat { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: .85rem .75rem; border-radius: 12px; }
.emj-chat--light { background: #dfe6d4; }
.emj-chat--dark { background: #0f1720; }
.emj-bubble { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 6px 10px; border-radius: 12px 12px 12px 4px; font: 15px/22px system-ui, -apple-system, "Segoe UI", sans-serif; }
.emj-chat--light .emj-bubble { background: #fff; color: #111; }
.emj-chat--dark .emj-bubble { background: #212d3b; color: #f2f2f2; }
.emj-bubble canvas { width: 22px; height: 22px; }
.emj-big canvas { display: block; width: 72px; height: 72px; }

/* how-to */
.emj-howto { margin-top: clamp(2rem, 5vw, 3rem); padding: clamp(1.25rem, 3vw, 1.9rem); border-radius: var(--radius); background: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 1px var(--line); }
.emj-howto h2 { margin: 0 0 1rem; font-size: var(--fs-h3, 1.4rem); line-height: 1.2; }
.emj-howto__grid { display: grid; gap: 1rem 2.5rem; }
@media (min-width: 860px) { .emj-howto__grid { grid-template-columns: 1fr 1fr; } }
.emj-steps, .emj-tips { margin: 0; padding: 0; list-style: none; display: grid; gap: .75rem; font-family: var(--font-text); font-size: 1rem; line-height: 1.55; color: var(--ink); }
.emj-steps { counter-reset: emj; }
.emj-steps li { position: relative; padding-left: 2.3rem; counter-increment: emj; }
.emj-steps li::before { content: counter(emj); position: absolute; left: 0; top: .1em; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 .8rem/1 var(--font-ui); }
.emj-tips li { position: relative; padding-left: 1.4rem; }
.emj-tips li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); }
.emj-howto strong { color: var(--ink-strong); font-weight: 650; }

.emj-note { max-width: 720px; margin: 1.75rem auto 0; text-align: center; font-size: var(--fs-xs); line-height: 1.6; color: var(--ink-2); }

/* optional page body from Ghost (FAQ ...) */
.emj-content { margin-top: clamp(2.5rem, 6vw, 4rem); }
