/* Clipsy — public site. Bold, sticker-like: cream paper, ink outlines, hard shadows. */

@font-face { font-family: 'Bricolage'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-500.woff2) format('woff2'); }

:root {
  --cream: #FFF7E6;
  --paper: #FFFFFF;
  --ink: #15130F;
  --ink-2: #3D3832;
  --muted: #77706A;
  --yellow: #FFD43B;
  --pink: #FF7AA8;
  --blue: #7FA8FF;
  --green: #25D366;
  --green-ink: #0B5C2E;
  --red: #E5484D;
  --line: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --radius: 18px;
  --font: 'Bricolage', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  background: var(--cream); color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* faint dotted paper */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(21, 19, 15, .09) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); }
[id] { scroll-margin-top: 20px; }

.icon { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.icon.xs { width: 13px; height: 13px; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }
.icon.xl { width: 30px; height: 30px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(.96) rotate(-1deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg); } }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 42px; height: 42px; transform: rotate(-6deg); transition: transform .2s; }
.logo:hover img { transform: rotate(4deg) scale(1.05); }
.logo-word { font-size: 28px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.top nav { display: flex; gap: 6px; }
.top nav a {
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
  border: 2px solid transparent;
}
.top nav a:hover { border-color: var(--ink); background: var(--paper); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 64px 0 34px; }
.hero h1 {
  font-size: clamp(40px, 8.2vw, 84px); font-weight: 800; line-height: .98; letter-spacing: -.045em;
  max-width: 860px; margin: 0 auto;
}
.hero h1 mark {
  background: var(--yellow); color: inherit; padding: 0 .12em; border-radius: 12px;
  border: var(--line); box-shadow: var(--shadow); display: inline-block; transform: rotate(-2.5deg);
}
.hero-sub { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 560px; margin: 22px auto 0; }

.float {
  position: absolute; padding: 7px 13px; border-radius: 12px; border: var(--line); box-shadow: var(--shadow);
  font-weight: 700; font-size: 14px; white-space: nowrap; background: var(--paper);
}
.float-1 { top: 6px; left: 4%; background: var(--pink); transform: rotate(-8deg); }
.float-2 { top: 168px; right: 0; background: var(--blue); transform: rotate(7deg); }
.float-3 { bottom: 0; left: 6%; background: var(--paper); transform: rotate(5deg); }
@media (max-width: 960px) { .float { display: none; } }

/* ─── Tool ───────────────────────────────────────────────────────────────── */
.tool { max-width: 880px; margin: 14px auto 0; }

.stepper { list-style: none; padding: 0; margin: 0 0 16px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.stepper li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  border: 2px solid rgba(21, 19, 15, .2); background: rgba(255, 255, 255, .6); color: var(--muted); font-weight: 600; font-size: 14px;
}
.stepper-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(21, 19, 15, .08); font-size: 13px; font-weight: 800; }
.stepper li.on { border: var(--line); background: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.stepper li.on .stepper-dot { background: var(--ink); color: var(--yellow); }
.stepper li.done { color: var(--ink-2); border-color: var(--ink); }
.stepper li.done .stepper-dot { background: var(--green); color: var(--ink); }

.panel { background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); animation: pop .25s ease; overflow: hidden; }
.panel-pad { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: var(--line); background: var(--cream); }
.panel-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; border: var(--line); font-weight: 600; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.notice > .icon { margin-top: 2px; }
.notice.error { background: #FFE1E1; }
.notice.warn { background: #FFF0B8; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 14px; border: var(--line);
  background: var(--paper); color: var(--ink); font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s, background-color .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--yellow); }
.btn.wa { background: var(--green); }
.btn.big { min-height: 60px; font-size: 20px; border-radius: 16px; }
.btn.full { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); }
.btn.plain { border-color: transparent; box-shadow: none; background: none; text-decoration: underline; text-underline-offset: 3px; }
.btn.plain:hover, .btn.plain:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.btn:focus-visible, .seg:focus-visible, .top nav a:focus-visible, .faq summary:focus-visible, .inp:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Drop zone */
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 56px 20px; border: 3px dashed var(--ink); border-radius: 20px; cursor: pointer; background: var(--cream);
  transition: background-color .15s, transform .15s;
}
.drop:hover, .drop.over { background: #FFF0B8; }
.drop.over { transform: scale(1.01); }
.drop:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 10px;
  background: var(--pink); border: var(--line); box-shadow: var(--shadow); transform: rotate(-6deg);
}
.drop:hover .drop-icon { animation: wiggle .5s ease; }
.drop strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.drop-or { color: var(--ink-2); }
.tool-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.editor-preview { padding: 22px; border-right: var(--line); display: flex; flex-direction: column; gap: 12px; background: var(--cream); }
.editor-controls { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.checker {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #EFE8D8 25%, transparent 25%, transparent 75%, #EFE8D8 75%),
    linear-gradient(45deg, #EFE8D8 25%, transparent 25%, transparent 75%, #EFE8D8 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px;
}
.frame { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; border: var(--line); }
.frame video, .frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.frame.crop video, .frame.crop img { object-fit: cover; }
.frame-tag { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 8px; background: var(--ink); color: var(--yellow); font-size: 12px; font-weight: 700; }
.hint { font-size: 13px; color: var(--muted); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 2px solid rgba(21, 19, 15, .15); background: var(--cream); min-width: 0; }
.file-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.field-label { display: block; font-weight: 700; font-size: 15px; }
.field-head output { font: 500 14px var(--mono); background: var(--ink); color: var(--yellow); padding: 1px 8px; border-radius: 6px; }
.inp { width: 100%; min-height: 44px; padding: 8px 12px; border: var(--line); border-radius: 12px; font: 500 15px var(--mono); background: var(--paper); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: var(--cream); border: 2px solid var(--ink); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--cream); border: 2px solid var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--yellow); border: var(--line); box-shadow: 2px 2px 0 var(--ink); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); border: var(--line); box-shadow: 2px 2px 0 var(--ink); }
input[type=range]:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

.range-text { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--paper); font: 500 14px var(--mono); }
.range-text::before { content: '✂'; color: var(--yellow); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.seg {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  border: 2px solid rgba(21, 19, 15, .25); border-radius: 12px; background: var(--paper); font-weight: 700; font-size: 14px; cursor: pointer;
}
.seg:hover { border-color: var(--ink); }
.seg.on { border: var(--line); background: var(--blue); box-shadow: 3px 3px 0 var(--ink); }
.watermark-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.watermark-note b { color: var(--ink); font-weight: 700; }

/* Working */
.work { padding: 56px 20px; text-align: center; }
.work-icon { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: var(--yellow); border: var(--line); box-shadow: var(--shadow); animation: wiggle 1s ease-in-out infinite; }
.work-text { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.bar { height: 14px; max-width: 360px; margin: 18px auto 12px; background: var(--cream); border: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--green), var(--green) 10px, #5BE38E 10px, #5BE38E 20px); transition: width .2s; }
.bar-fill.indeterminate { width: 40%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Result */
.result-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding: 26px; align-items: start; }
.result-preview { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.result { width: 100%; aspect-ratio: 1; border-radius: 22px; overflow: hidden; border: var(--line); box-shadow: var(--shadow-lg); transform: rotate(-3deg); }
.result img { width: 100%; height: 100%; display: block; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; border: 2px solid rgba(21, 19, 15, .2); font: 500 12px var(--mono); color: var(--ink-2); background: var(--paper); }
.result-side { display: flex; flex-direction: column; gap: 14px; }
.result-title { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.sound-badge, .silent-badge { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: var(--line); font-weight: 700; font-size: 15px; }
.sound-badge { background: #D9F7E4; }
.silent-badge { background: #FFF0B8; font-weight: 600; }

.wa-panel { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 18px; border: var(--line); background: #EFFFF4; }
.wa-steps { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--ink-2); }
.wa-steps strong { color: var(--ink); }
.wa-steps code { background: var(--ink); color: var(--yellow); padding: 2px 8px; border-radius: 6px; font-size: 14px; }
.wa-qr-row { display: flex; align-items: center; gap: 16px; padding-top: 14px; border-top: 2px dashed rgba(21, 19, 15, .25); }
.wa-qr { width: 128px; height: 128px; flex: none; border-radius: 12px; background: #fff; padding: 6px; border: var(--line); }
.wa-qr-row p { font-size: 14px; color: var(--ink-2); }
.wa-panel .hint { display: flex; align-items: center; gap: 6px; }
@media (max-width: 720px), (pointer: coarse) { .wa-qr-row { display: none; } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ─── Sections ───────────────────────────────────────────────────────────── */
.section { max-width: 980px; margin: 110px auto 0; }
.section-title { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1; text-align: center; margin-bottom: 40px; }
.section-title span { display: inline-block; background: var(--pink); border: var(--line); border-radius: 12px; padding: 0 .14em; box-shadow: var(--shadow); transform: rotate(2deg); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-step { position: relative; padding: 28px 22px 24px; border: var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-lg); }
.how-step:nth-child(1) { transform: rotate(-1.5deg); }
.how-step:nth-child(2) { transform: rotate(1deg) translateY(10px); }
.how-step:nth-child(3) { transform: rotate(-.8deg); }
.how-num {
  position: absolute; top: -20px; left: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; font-weight: 800; border: var(--line); box-shadow: 3px 3px 0 var(--ink);
}
.how-step:nth-child(1) .how-num { background: var(--yellow); }
.how-step:nth-child(2) .how-num { background: var(--blue); }
.how-step:nth-child(3) .how-num { background: var(--green); }
.how-step h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 8px; }
.how-step p { color: var(--ink-2); font-size: 15px; }

.good { margin-top: 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
.good-card { padding: 24px; border: var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.good-card.yellow { background: var(--yellow); }
.good-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.good-card ul, .good-card ol { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); }
.good-card.yellow ul { color: var(--ink); }
.good-card b { color: var(--ink); }
.save-os + .save-os { margin-top: 16px; padding-top: 16px; border-top: 2px dashed rgba(21, 19, 15, .25); }
.save-os h4 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }

.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { border: var(--line); border-radius: 16px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.faq details[open] { background: #FFFBEF; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); font-size: 20px; font-weight: 700; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--yellow); }
.faq details p { padding: 0 20px 18px; color: var(--ink-2); font-size: 15px; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.foot { margin-top: 110px; border-top: var(--line); background: var(--ink); color: var(--cream); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-top: 28px; padding-bottom: 28px; }
.foot .logo-word { font-size: 24px; color: var(--yellow); }
.foot .logo img { width: 34px; height: 34px; }
.foot p { font-size: 14px; color: #CFC6B8; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .how { grid-template-columns: 1fr; gap: 34px; max-width: 460px; margin: 0 auto; }
  .how-step:nth-child(n) { transform: none; }
  .good { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top nav a:not(:last-child) { display: none; }
  .hero { padding-top: 12px; }
  .editor, .result-grid { grid-template-columns: 1fr; }
  .editor-preview { border-right: 0; border-bottom: var(--line); }
  .result-grid { padding: 20px; }
  .result { max-width: 260px; }
  .drop { padding: 40px 16px; }
  .panel-pad, .editor-preview, .editor-controls { padding: 16px; }
  .section { margin-top: 80px; }
  .stepper-label { display: none; }
  .stepper li { padding: 6px; }
  .stepper li.on .stepper-label { display: inline; }
  .stepper li.on { padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Queue info */
.tool-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 14px; }
.tool-foot .tool-note { margin-top: 0; }
.queue-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: #D9F7E4; font-weight: 700; font-size: 14px;
}
.queue-pill.busy { background: #FFF0B8; }
.queue-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--ink); }
.queue-pill.busy .queue-dot { background: var(--yellow); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.7); } }
.work-eta { margin-top: 6px; font-weight: 700; font-size: 16px; color: var(--ink-2); }
