:root {
  --bg: #07080a;
  --bg2: #0e1014;
  --card: #13161b;
  --card2: #1a1e25;
  --line: #262b34;
  --text: #eef0f3;
  --dim: #9aa3b2;
  --faint: #636c7b;
  --green: #06c755;
  --green2: #2ee88a;
  --violet: #8b5cf6;
  --danger: #ff5d6c;
  --radius: 18px;
  --font: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(7, 8, 10, .72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: conic-gradient(from 210deg, var(--green), var(--green2), var(--violet), var(--green));
  display: grid; place-items: center; color: #04140a; font-size: 15px; font-weight: 900;
}
.nav .grow { flex: 1; }
.nav a.link { color: var(--dim); text-decoration: none; font-size: 14px; }
.nav a.link:hover { color: var(--text); }
.who { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.who img { width: 28px; height: 28px; border-radius: 50%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  padding: 10px 18px; font-weight: 700; font-size: 15px;
  background: var(--card2); color: var(--text); transition: transform .12s, filter .12s, background .12s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--green), var(--green2)); color: #03150a; }
.btn.line { background: var(--green); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.big { padding: 15px 26px; font-size: 17px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- landing ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 10vw, 120px) 16px clamp(40px, 6vw, 72px);
  text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 120%;
  background:
    radial-gradient(40% 50% at 30% 40%, rgba(6, 199, 85, .22), transparent 70%),
    radial-gradient(35% 45% at 72% 35%, rgba(139, 92, 246, .22), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero > * { position: relative; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--dim);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.pill b { color: var(--green2); font-weight: 700; }
h1.title {
  margin: 22px auto 14px; max-width: 900px;
  font-size: clamp(36px, 7vw, 76px); line-height: 1.08; letter-spacing: -.02em; font-weight: 900;
}
h1.title .grad { background: linear-gradient(100deg, var(--green2), #b7f7d2 40%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 0 auto; max-width: 640px; color: var(--dim); font-size: clamp(16px, 2.2vw, 19px); }

.prompt {
  margin: 36px auto 0; max-width: 760px; text-align: left;
  padding: 2px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(46,232,138,.7), rgba(139,92,246,.7));
  box-shadow: 0 30px 80px -30px rgba(6,199,85,.45);
}
.prompt-inner { background: var(--bg2); border-radius: 22px; padding: 18px 18px 14px; }
.prompt textarea {
  width: 100%; min-height: 84px; resize: none; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 19px; line-height: 1.5;
}
.prompt textarea::placeholder { color: var(--faint); }
.prompt-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.prompt-bar .meta { color: var(--faint); font-size: 13px; flex: 1; min-width: 160px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 18px auto 0; max-width: 820px; }
.chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--dim);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: #3a4150; }
.error-text { color: var(--danger); font-size: 14px; margin-top: 10px; min-height: 1.2em; text-align: center; }

.section { padding: 56px clamp(16px, 4vw, 40px); max-width: 1240px; margin: 0 auto; }
.section h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 6px; letter-spacing: -.01em; }
.section .sub { color: var(--dim); margin: 0 0 26px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.work {
  background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .18s, border-color .18s;
}
.work:hover { transform: translateY(-4px); border-color: rgba(46,232,138,.4); }
.work .shot { position: relative; aspect-ratio: 390 / 520; overflow: hidden; background: #000; }
.work .shot img.page { width: 100%; }
.work .shot img.menu { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; border-top: 1px solid rgba(0,0,0,.3); }
.work .body { padding: 14px 16px 16px; }
.work .name { font-weight: 800; display: flex; gap: 6px; align-items: center; }
.work .said { color: var(--dim); font-size: 13px; margin-top: 6px; }
.work .said::before { content: "「"; } .work .said::after { content: "」"; }

.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step3 { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 22px; }
.step3 .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; background: rgba(46,232,138,.12); color: var(--green2); }
.step3 h3 { margin: 14px 0 6px; font-size: 19px; }
.step3 p { margin: 0; color: var(--dim); font-size: 15px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; max-width: 860px; }
.plan { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 26px; }
.plan.hot { border-color: rgba(46,232,138,.55); background: linear-gradient(180deg, rgba(6,199,85,.10), var(--card) 55%); }
.plan .price { font-size: 40px; font-weight: 900; letter-spacing: -.02em; margin: 8px 0 2px; }
.plan .price small { font-size: 15px; color: var(--dim); font-weight: 600; }
.plan ul { padding: 0; margin: 16px 0 0; list-style: none; color: var(--dim); font-size: 15px; }
.plan li { padding: 6px 0 6px 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 10px; height: 6px; border-left: 2px solid var(--green2); border-bottom: 2px solid var(--green2); transform: rotate(-45deg); }

.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mine a { text-decoration: none; background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 16px; display: block; }
.mine a:hover { border-color: #3a4150; }
.badge { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--card2); color: var(--dim); }
.badge.ok { background: rgba(46,232,138,.14); color: var(--green2); }
.badge.run { background: rgba(139,92,246,.18); color: #c4b5fd; }
.badge.bad { background: rgba(255,93,108,.14); color: var(--danger); }

.mission { text-align: center; padding: 64px 16px 80px; color: var(--faint); font-size: 14px; }
.mission b { display: block; color: var(--dim); font-size: clamp(17px, 2.4vw, 22px); letter-spacing: .01em; margin-bottom: 6px; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 22px; padding: 22px clamp(16px, 3vw, 32px) 40px; max-width: 1320px; margin: 0 auto; }
@media (max-width: 980px) { .studio { grid-template-columns: 1fr; } .phone-col { order: -1; } }
.panel { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { margin: 0 0 4px; font-size: 20px; }
.panel .sentence { color: var(--dim); font-size: 15px; }
.head-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.head-row .grow { flex: 1; min-width: 200px; }

.timeline { display: flex; gap: 6px; margin: 18px 0 6px; flex-wrap: wrap; }
.tl { flex: 1; min-width: 74px; text-align: center; font-size: 12px; color: var(--faint); }
.tl .bar { height: 5px; border-radius: 3px; background: var(--card2); margin-bottom: 6px; overflow: hidden; }
.tl.done .bar { background: var(--green); }
.tl.now .bar { background: linear-gradient(90deg, var(--green), var(--violet), var(--green)); background-size: 200% 100%; animation: flow 1.4s linear infinite; }
.tl.done, .tl.now { color: var(--dim); }
@keyframes flow { to { background-position: -200% 0; } }

.feed { display: flex; flex-direction: column; gap: 10px; max-height: 56vh; overflow-y: auto; padding-right: 4px; margin-top: 12px; }
.say { background: var(--card2); border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.work-note { font-size: 13px; color: var(--faint); padding-left: 6px; }
.work-note::before { content: "• "; color: var(--green2); }
.thinking { display: inline-flex; gap: 4px; padding: 10px 14px; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.timer { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }

.cta-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta-box .grow { flex: 1; min-width: 200px; }
.cta-box .big-price { font-size: 26px; font-weight: 900; }

.form { display: grid; gap: 14px; margin-top: 14px; }
.field label { display: block; font-size: 14px; color: var(--dim); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: inherit; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px;
}
.field input:focus { outline: 2px solid rgba(46,232,138,.5); border-color: transparent; }
.group-title { font-weight: 800; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.hint { color: var(--faint); font-size: 13px; }
.log { background: var(--bg2); border-radius: 12px; padding: 12px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; white-space: pre-wrap; color: var(--dim); max-height: 260px; overflow: auto; }
.okline { color: var(--green2); }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; }

/* ---------- phone simulator ---------- */
.phone-col { position: sticky; top: 80px; align-self: start; }
.phone {
  width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 400 / 820; max-height: calc(100vh - 110px);
  border-radius: 46px; padding: 12px; background: #000;
  box-shadow: 0 0 0 1.5px #2a2f38, 0 40px 90px -30px rgba(0,0,0,.9), 0 0 120px -40px rgba(6,199,85,.35);
  position: relative;
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #8cabd9; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 34px 14px 10px; background: #fff; color: #111; font-weight: 700; font-size: 15px; }
.chat-head .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: #eee; }
.chat { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; background: #8cabd9; }
.msg { max-width: 82%; font-size: 14px; color: #111; }
.msg.me { align-self: flex-end; }
.msg .bubble { background: #fff; border-radius: 16px; padding: 8px 12px; white-space: pre-wrap; word-break: break-word; }
.msg.me .bubble { background: #a3e57d; }
.msg .fx { width: 260px; max-width: 100%; }
.sys { align-self: center; background: rgba(0,0,0,.18); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.qr-row { display: flex; gap: 6px; overflow-x: auto; padding: 4px 10px 8px; background: #8cabd9; }
.qr-row button { flex: none; background: #fff; color: #111; border: 1px solid #ccc; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.composer { display: flex; gap: 6px; padding: 8px; background: #fff; align-items: center; }
.composer input { flex: 1; border: 0; background: #f1f2f4; border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 14px; color: #111; outline: 0; }
.composer button { border: 0; background: var(--green); color: #fff; border-radius: 999px; width: 36px; height: 36px; cursor: pointer; font-weight: 900; }
.composer .menu-toggle { background: #f1f2f4; color: #333; font-size: 12px; width: auto; padding: 0 12px; font-weight: 700; }
.rmenu { position: relative; background: #fff; border-top: 1px solid #e5e5e5; }
.rmenu img { width: 100%; }
.rmenu .hit { position: absolute; cursor: pointer; }
.rmenu .hit:hover { background: rgba(6,199,85,.15); outline: 2px solid rgba(6,199,85,.6); outline-offset: -2px; }
.rmenu-bar { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px; background: #fff; color: #333; font-size: 13px; font-weight: 700; cursor: pointer; border-top: 1px solid #eee; }
.liff { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #fff; transform: translateY(100%); transition: transform .28s ease; }
.liff.open { transform: none; }
.liff-head { display: flex; align-items: center; gap: 8px; padding: 34px 12px 8px; background: #fff; color: #111; border-bottom: 1px solid #eee; font-size: 13px; }
.liff-head .x { margin-left: auto; border: 0; background: #f1f2f4; border-radius: 999px; padding: 5px 12px; cursor: pointer; color: #111; }
.liff iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.phone-empty { flex: 1; display: grid; place-items: center; text-align: center; color: #fff; padding: 30px; font-size: 15px; background: linear-gradient(180deg, #8cabd9, #6f8fc4); }
.phone-note { text-align: center; color: var(--faint); font-size: 13px; margin-top: 12px; }

/* Flex message (approximation of LINE's renderer) */
.fx-bubble { background: #fff; border-radius: 16px; overflow: hidden; color: #111; }
.fx-carousel { display: flex; gap: 8px; overflow-x: auto; width: 300px; max-width: 100%; scroll-snap-type: x mandatory; }
.fx-carousel > .fx-bubble { flex: none; width: 240px; scroll-snap-align: start; }
.fx-box { display: flex; min-width: 0; }
.fx-v { flex-direction: column; }
.fx-h { flex-direction: row; }
.fx-text { min-width: 0; }
.fx-btn { display: block; width: 100%; border: 0; border-radius: 8px; padding: 9px 10px; cursor: pointer; font-size: 14px; font-weight: 700; text-align: center; }
.fx-btn.primary { color: #fff; }
.fx-btn.secondary { background: #eef0f3; color: #111; }
.fx-btn.link { background: transparent; color: #2a6fdb; font-weight: 600; }
.fx-sep { border: 0; border-top: 1px solid #e6e6e6; margin: 0; align-self: stretch; }
.fx-img { width: 100%; object-fit: cover; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #22262e; color: var(--text); padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.hidden { display: none !important; }
