:root {
  --bg: #f2f2f7;
  --paper: #ffffff;
  --paper-2: #f7f7fa;
  --ink: #1c1c1e;
  --muted: #8e8e93;
  --line: rgba(60, 60, 67, .13);
  --green: #007aff;
  --green-deep: #007aff;
  --green-soft: #eaf3ff;
  --orange: #ff9500;
  --orange-soft: #fff2df;
  --red: #d94b5c;
  --blue: #397bd4;
  --purple: #8062ca;
  --cyan: #2aa4ae;
  --shadow: 0 14px 35px rgba(28, 28, 30, .11);
  --shadow-float: 0 18px 50px rgba(28, 28, 30, .16);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(0,122,255,.24); outline-offset: 2px; }
.visually-hidden { position: fixed; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; padding: 26px 17px 20px; display: flex; flex-direction: column; background: rgba(255,255,255,.82); border-right: 1px solid var(--line); backdrop-filter: blur(24px); z-index: 20; }
.brand { padding: 0 8px 29px; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg,#0a84ff,#0062d7); font-family: "Songti SC", serif; font-size: 19px; font-weight: 900; box-shadow: 0 7px 16px rgba(0,122,255,.24); }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 16px; }
.brand span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.nav { display: grid; gap: 6px; }
.nav-item { width: 100%; min-height: 45px; padding: 0 12px; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 10px; color: #626861; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item:hover { color: var(--ink); background: #efeee9; }
.nav-item.active { color: var(--green); background: var(--green-soft); font-weight: 700; }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; }
.nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item em { margin-left: auto; min-width: 22px; padding: 2px 6px; color: var(--muted); background: #ebe9e2; border-radius: 12px; font-size: 9px; font-style: normal; text-align: center; }
.sidebar-guide { margin-top: auto; padding: 15px; color: var(--muted); background: #f2f2f7; border-radius: 14px; }
.sidebar-guide span { color: var(--green); font-size: 10px; font-weight: 800; }
.sidebar-guide p { margin: 8px 0 0; font-size: 11px; line-height: 1.8; }

.main { grid-column: 2; min-width: 0; padding: 29px 38px 70px; }
.topbar { max-width: 1240px; margin: 0 auto 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 11px; }
h1 { margin: 0; font-size: clamp(25px,3vw,34px); line-height: 1.2; letter-spacing: -.045em; }
.top-actions { display: flex; align-items: center; gap: 17px; }
.save-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: #34c759; }
.avatar { width: 39px; height: 39px; border: 0; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#0a84ff,#5ac8fa); cursor: pointer; font-weight: 800; box-shadow: 0 4px 12px rgba(0,122,255,.2); transition: transform .16s ease, box-shadow .16s ease; }
.avatar:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(0,122,255,.24); }
.page { display: none; max-width: 1240px; margin: 0 auto; }
.page.active { display: block; animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }

.card { background: var(--paper); border: 1px solid rgba(60,60,67,.09); border-radius: var(--radius); box-shadow: 0 2px 8px rgba(28,28,30,.035); }
.section-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.step-no { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 10px; font-weight: 800; }
.section-kicker h2 { margin: 0; font-size: 15px; }
.section-kicker span { margin-left: auto; color: var(--muted); font-size: 10px; }
.primary-button, .secondary-button, .ghost-button { min-height: 40px; padding: 0 15px; border: 0; border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 750; transition: .17s ease; }
.primary-button { color: #fff; background: var(--green); box-shadow: 0 5px 14px rgba(0,122,255,.2); }
.primary-button:hover { background: #006ee6; }
.secondary-button { color: var(--green); background: var(--green-soft); }
.ghost-button { color: #636366; background: #f2f2f7; }
.danger-button { color: #b5473c; }
.text-button { padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
button:disabled { opacity: .45; cursor: default; }

/* Creation map */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 365px; gap: 18px; align-items: start; }
.map-workspace { display: grid; gap: 14px; }
.map-section { padding: 19px; }
.element-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.element-card { position: relative; min-height: 112px; padding: 13px; border: 1px solid rgba(60,60,67,.11); border-radius: 13px; background: #fff; cursor: pointer; text-align: left; overflow: hidden; transition: .18s ease; }
.element-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--element-color); opacity: .72; }
.element-card:hover { transform: translateY(-2px); border-color: #c5c6bd; }
.element-card.selected { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(0,122,255,.24); }
.element-card header { display: flex; align-items: center; justify-content: space-between; }
.element-card header b { font-size: 13px; }
.element-card header i { color: var(--element-color); font-size: 17px; font-style: normal; }
.element-card p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.element-card small { position: absolute; left: 13px; bottom: 11px; color: var(--element-color); font-size: 9px; font-weight: 700; }
.element-detail { margin-top: 13px; padding: 16px; border: 1px solid rgba(60,60,67,.09); border-radius: 14px; background: #f7f7fa; }
.element-detail-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.element-detail-title > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--element-color); font-size: 17px; box-shadow: 0 4px 10px color-mix(in srgb,var(--element-color) 25%,transparent); }
.element-detail-title small, .element-detail-title h3 { display: block; margin: 0; }
.element-detail-title small { color: var(--muted); font-size: 8px; }
.element-detail-title h3 { margin-top: 2px; font-size: 16px; }
.element-detail-copy { display: grid; grid-template-columns: .9fr 1.35fr 1fr; gap: 9px; }
.element-detail-copy > div { min-height: 88px; padding: 11px 12px; border-radius: 10px; background: #fff; }
.element-detail-copy b { font-size: 9px; }
.element-detail-copy p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.idea-starters { margin-top: 11px; padding-top: 11px; border-top: 1px solid color-mix(in srgb, var(--element-color) 18%, var(--line)); }
.idea-starters header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.idea-starters header b { font-size: 10px; }
.idea-starters header span { color: var(--muted); font-size: 8px; }
.idea-starters > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.idea-starters button { min-height: 39px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 9px; color: #4f574f; background: #fff; cursor: pointer; text-align: left; font-size: 9px; line-height: 1.4; }
.idea-starters button:hover { color: var(--green); border-color: var(--green); }
.idea-starters button i { color: var(--element-color); font-size: 14px; font-style: normal; }
.format-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.format-grid { padding: 4px; border-radius: 14px; background: #f2f2f7; }
.format-card { min-height: 75px; padding: 13px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; text-align: left; }
.format-card.selected { color: var(--green); border: 0; background: #fff; box-shadow: 0 2px 8px rgba(28,28,30,.09); }
.format-card b, .format-card span { display: block; }
.format-card b { font-size: 13px; }
.format-card span { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.prompt-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,.65fr); gap: 12px; }
.combo-box { padding: 16px; border-radius: 13px; background: linear-gradient(145deg,#007aff,#36a2ff); color: #fff; box-shadow: 0 7px 18px rgba(0,122,255,.15); }
.combo-box .combo-label { color: rgba(255,255,255,.72); font-size: 9px; }
.combo-box h3 { margin: 8px 0 11px; font-size: 17px; }
.combo-box ul { margin: 0; padding-left: 17px; color: rgba(255,255,255,.86); font-size: 10px; line-height: 1.9; }
.example-box { padding: 15px; background: #fff7e8; border-radius: 13px; }
.example-box span { color: #b86a00; font-size: 9px; font-weight: 800; }
.example-box p { margin: 8px 0 0; font-size: 12px; font-weight: 700; line-height: 1.55; }
.question-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.question-chip { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: #5d635d; background: var(--paper-2); cursor: pointer; font-size: 10px; }
.question-chip:hover, .question-chip.selected { color: var(--green); border-color: rgba(0,122,255,.25); background: var(--green-soft); }

.composer { position: sticky; top: 22px; overflow: hidden; }
.composer-head { padding: 18px 20px 14px; color: #fff; background: linear-gradient(145deg,#007aff,#369cff); }
.composer-head span { color: rgba(255,255,255,.72); font-size: 9px; }
.composer-head h2 { margin: 5px 0 0; font-size: 17px; }
.composer-body { padding: 18px 20px 20px; }
.context-tags { min-height: 26px; display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 18px; color: #687068; background: #eeece5; font-size: 9px; }
.tag.accent { color: #9e512a; background: var(--orange-soft); }
.tag.done { color: var(--green); background: var(--green-soft); }
.form-field + .form-field { margin-top: 12px; }
.form-field label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 10px; font-weight: 750; }
.form-field label span { color: var(--muted); font-size: 9px; font-weight: 400; }
.form-field input, .form-field textarea, .form-field select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfaf6; outline: none; font-size: 11px; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: #95b19f; box-shadow: 0 0 0 3px var(--green-soft); }
.form-field textarea { min-height: 68px; resize: vertical; line-height: 1.55; }
.composer-tip { margin: 13px 0; padding: 10px 11px; color: #626267; background: #f2f2f7; border-radius: 10px; font-size: 9px; line-height: 1.55; }
.composer-actions { display: flex; gap: 8px; }
.composer-actions .primary-button { flex: 1; }
.mobile-compose-bar { display: none; }
.more-fields { margin-top: 13px; border-top: 1px solid var(--line); }
.more-fields summary { padding: 13px 0 2px; color: var(--green); cursor: pointer; font-size: 11px; font-weight: 750; }
.more-fields summary span { float: right; color: var(--muted); font-size: 9px; font-weight: 400; }
.more-fields .form-field { margin-top: 12px; }
.mobile-sheet-actions { padding-top: 17px; display: flex; gap: 8px; }
.mobile-sheet-actions .primary-button { flex: 1; }

/* Inspiration */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { width: 275px; height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); outline: none; font-size: 11px; }
.search:focus { border-color: #95b19f; box-shadow: 0 0 0 3px var(--green-soft); }
.filter-select { height: 39px; padding: 0 29px 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--paper); font-size: 10px; }
.inspiration-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.inspiration-card { min-height: 238px; padding: 17px; display: flex; flex-direction: column; }
.card-source { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.source-name { color: #b64c3f; font-weight: 750; }
.inspiration-card h3 { margin: 17px 0 8px; font-size: 14px; line-height: 1.55; }
.inspiration-card .stop-reason { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inspiration-card .context-tags { margin-top: auto; margin-bottom: 12px; padding-top: 14px; }
.inspiration-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid #efede7; }
.inspiration-card footer div { display: flex; gap: 10px; }
.empty-state { padding: 70px 20px; color: var(--muted); text-align: center; }
.empty-state i { width: 54px; height: 54px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 17px; color: var(--green); background: var(--green-soft); font-size: 22px; font-style: normal; }
.empty-state b { display: block; color: var(--ink); font-size: 13px; }
.empty-state p { margin: 8px auto 17px; max-width: 300px; font-size: 10px; line-height: 1.65; }

/* Pool */
.pool-summary { margin-bottom: 15px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.summary-card { padding: 15px 17px; }
.summary-card span { color: var(--muted); font-size: 9px; }
.summary-card strong { display: block; margin-top: 5px; font-size: 21px; }
.status-tabs { display: flex; padding: 3px; border-radius: 10px; background: #eae8e1; }
.status-tab { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; }
.status-tab.active { color: var(--ink); background: var(--paper); box-shadow: 0 2px 8px rgba(31,39,32,.07); font-weight: 750; }
.topic-list { display: grid; gap: 9px; }
.topic-card { position: relative; padding: 15px 17px; display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 13px; transition: .17s ease; }
.topic-card:hover { transform: translateY(-1px); border-color: #d5d3c9; }
.topic-card.shot { opacity: .64; background: #f6f5f0; }
.topic-check { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }
.topic-main h3 { margin: 0 0 7px; font-size: 13px; line-height: 1.45; }
.topic-main p { margin: 7px 0 0; color: var(--muted); font-size: 9px; }
.topic-actions { display: flex; align-items: center; gap: 6px; }
.topic-actions button { min-height: 33px; padding: 0 10px; font-size: 9px; }
.more-button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; color: var(--muted); background: #f2f2f7; cursor: pointer; font-weight: 800; letter-spacing: 1px; }
.selection-bar { position: fixed; left: calc(50% + 112px); bottom: 24px; z-index: 30; transform: translateX(-50%); min-width: 410px; padding: 10px 11px 10px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink); background: rgba(255,255,255,.96); border: .5px solid rgba(60,60,67,.16); border-radius: 15px; box-shadow: var(--shadow); backdrop-filter: blur(20px); animation: rise .2s ease; }
@keyframes rise { from { opacity: 0; transform: translate(-50%,8px); } }
.selection-bar span { font-size: 10px; }
.selection-bar b { color: #007aff; }
.selection-bar button { min-height: 35px; border: 0; border-radius: 10px; padding: 0 13px; color: #fff; background: #007aff; cursor: pointer; font-size: 10px; font-weight: 750; }

/* Modal and shooting */
.modal-root:empty { display: none; }
.modal-root { position: fixed; inset: 0; z-index: 100; padding: 20px; display: grid; place-items: center; background: rgba(0,0,0,.36); backdrop-filter: blur(8px); }
.modal { width: min(630px,100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--paper); border-radius: 20px; box-shadow: var(--shadow); animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(7px) scale(.985); } }
.modal-header { padding: 20px 22px 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.close-button { width: 31px; height: 31px; border: 0; border-radius: 50%; background: #efede7; cursor: pointer; font-size: 18px; }
.modal-body { padding: 19px 22px 23px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .form-field + .form-field { margin-top: 0; }
.form-field.full { grid-column: 1/-1; }
.modal-actions { padding-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }

.confirm-modal { width: min(390px,100%); }
.confirm-sheet { padding: 28px; text-align: center; }
.confirm-icon { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; color: #ff3b30; background: #fff1f0; font-size: 22px; font-weight: 800; }
.confirm-sheet h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.confirm-sheet p { margin: 9px auto 22px; max-width: 310px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.danger-solid-button { min-height: 42px; padding: 0 14px; border: 0; border-radius: 11px; color: #fff; background: #ff3b30; cursor: pointer; font-size: 12px; font-weight: 750; }

.action-sheet, .workspace-menu { width: min(430px,100%); overflow: hidden; }
.action-sheet-head { padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.action-sheet-label { color: var(--muted); font-size: 9px; }
.action-sheet-head h2 { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
.action-list { padding: 8px; }
.action-list button { width: 100%; min-height: 58px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.action-list button:hover { background: #f2f2f7; }
.action-list span, .action-list b, .action-list small { display: block; }
.action-list b { font-size: 12px; }
.action-list small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.action-list i { color: var(--muted); font-size: 17px; font-style: normal; }
.action-list .danger-row b, .action-list .danger-row i { color: #ff3b30; }
.sheet-cancel { width: calc(100% - 16px); min-height: 44px; margin: 0 8px 8px; border: 0; border-radius: 12px; color: var(--green); background: #f2f2f7; cursor: pointer; font-size: 12px; font-weight: 750; }

.workspace-menu-head { padding: 24px 22px 15px; display: flex; align-items: center; gap: 12px; }
.workspace-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg,#0a84ff,#5ac8fa); font-size: 18px; font-weight: 850; box-shadow: 0 7px 18px rgba(0,122,255,.2); }
.workspace-menu-head span { color: var(--muted); font-size: 9px; }
.workspace-menu-head h2 { margin: 3px 0 0; font-size: 17px; }
.workspace-stats { margin: 0 14px 8px; padding: 14px 8px; display: grid; grid-template-columns: repeat(3,1fr); border-radius: 14px; background: #f2f2f7; }
.workspace-stats div { text-align: center; }
.workspace-stats div + div { border-left: 1px solid rgba(60,60,67,.12); }
.workspace-stats strong, .workspace-stats span { display: block; }
.workspace-stats strong { font-size: 18px; }
.workspace-stats span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.workspace-actions { margin: 2px 6px; }
.privacy-note { margin: 3px 20px 16px; color: var(--muted); font-size: 9px; line-height: 1.6; }

.shooting-modal { width: min(900px,100%); height: min(720px,calc(100vh - 34px)); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.shooting-progress { color: var(--muted); font-size: 10px; }
.shooting-body { overflow: auto; padding: 25px 30px; }
.shooting-no { color: var(--orange); font-size: 10px; font-weight: 800; }
.shooting-title { max-width: 730px; margin: 8px 0 17px; font-size: clamp(22px,3vw,31px); line-height: 1.4; letter-spacing: -.035em; }
.shooting-script { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.script-block { padding: 14px; border-radius: 12px; background: var(--paper-2); }
.script-block.full { grid-column: 1/-1; }
.script-block span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.script-block p { margin: 0; min-height: 20px; font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.shooting-footer { padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); background: #fbfaf6; }
.shooting-nav { display: flex; gap: 7px; }
.shot-toggle { min-height: 39px; padding: 0 16px; border: 0; border-radius: 10px; color: #fff; background: var(--green); cursor: pointer; font-size: 11px; font-weight: 800; }

.toast { position: fixed; left: 50%; bottom: 25px; z-index: 200; padding: 10px 15px; color: #fff; background: #1d271f; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%,16px); transition: .2s ease; font-size: 10px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.icp-footer { max-width: 1240px; margin: 28px auto 0; padding: 16px 0 0; text-align: center; }
.icp-footer a { color: #8e8e93; font-size: 10px; text-decoration: none; }
.icp-footer a:hover { color: #007aff; }

@media (max-width: 1050px) {
  .map-layout { grid-template-columns: 1fr; }
  .composer { position: static; }
  .inspiration-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 800px) {
  body { background: #f2f2f7; -webkit-tap-highlight-color: transparent; }
  .app-shell { display: block; }
  .sidebar { inset: auto 0 0; width: auto; height: 68px; padding: 5px 9px calc(5px + env(safe-area-inset-bottom)); border: 0; border-top: .5px solid rgba(60,60,67,.18); background: rgba(250,250,252,.9); backdrop-filter: blur(24px) saturate(180%); }
  .brand, .sidebar-guide { display: none; }
  .nav { height: 100%; grid-template-columns: repeat(3,1fr); }
  .nav-item { min-height: 52px; padding: 0; flex-direction: column; justify-content: center; gap: 3px; color: #8e8e93; background: transparent; font-size: 9px; }
  .nav-item:hover, .nav-item.active { color: #007aff; background: transparent; }
  .nav-icon, .nav-icon svg { width: 21px; height: 21px; }
  .nav-item em { display: none; }
  .main { padding: 8px 10px 147px; }
  .topbar { position: sticky; top: 0; z-index: 15; margin: 0 -10px 10px; padding: 9px 13px 10px; background: rgba(242,242,247,.88); backdrop-filter: blur(20px) saturate(170%); }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 21px; font-weight: 760; letter-spacing: -.035em; }
  .avatar { width: 34px; height: 34px; font-size: 11px; }
  .save-state { display: none; }
  .map-layout { grid-template-columns: minmax(0,1fr); min-width: 0; }
  .map-workspace { min-width: 0; gap: 9px; }
  .map-section { min-width: 0; padding: 13px; overflow: hidden; border: 0; border-radius: 17px; box-shadow: 0 1px 2px rgba(28,28,30,.04); }
  .section-kicker { margin-bottom: 10px; }
  .section-kicker h2 { font-size: 13px; }
  .section-kicker > span { display: none; }
  .step-no { width: 21px; height: 21px; font-size: 9px; }
  .element-grid { grid-template-columns: repeat(4,1fr); gap: 6px; }
  .element-card { min-height: 62px; padding: 8px 4px; border-color: rgba(60,60,67,.1); background: #f7f7fa; text-align: center; }
  .element-card::before { display: none; }
  .element-card.selected { border-color: #007aff; background: #edf5ff; box-shadow: inset 0 0 0 .5px #007aff; }
  .element-card header { height: 100%; flex-direction: column-reverse; justify-content: center; gap: 5px; }
  .element-card header b { font-size: 11px; }
  .element-card header i { font-size: 14px; }
  .element-card p, .element-card small { display: none; }
  .element-detail { margin-top: 9px; padding: 11px; border: 0; background: #f7f7fa; }
  .element-detail-title { margin-bottom: 9px; }
  .element-detail-title > span { width: 29px; height: 29px; border-radius: 8px; font-size: 14px; }
  .element-detail-title small { display: none; }
  .element-detail-title h3 { font-size: 14px; }
  .element-detail-copy { display: block; }
  .element-detail-copy > div { min-height: 0; padding: 9px 10px; border: .5px solid rgba(60,60,67,.08); }
  .element-detail-copy > div + div { margin-top: 5px; }
  .element-detail-copy p { font-size: 10px; }
  .idea-starters header span { display: none; }
  .idea-starters > div { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; scroll-snap-type: x mandatory; }
  .idea-starters button { min-width: 235px; min-height: 44px; border: .5px solid rgba(60,60,67,.16); scroll-snap-align: start; }
  .format-grid { grid-template-columns: repeat(3,1fr); gap: 2px; padding: 3px; border-radius: 11px; }
  .format-card { min-height: 44px; padding: 8px 4px; border-radius: 9px; text-align: center; }
  .format-card b { font-size: 10px; }
  .format-card span { display: none; }
  .prompt-grid { grid-template-columns: 1fr; gap: 7px; }
  .combo-box { padding: 13px; box-shadow: 0 6px 16px rgba(0,122,255,.14); }
  .combo-box h3 { margin: 5px 0 7px; font-size: 14px; }
  .combo-box ul { font-size: 9px; line-height: 1.75; }
  .example-box { padding: 11px 12px; }
  .example-box p { margin-top: 5px; font-size: 11px; }
  .question-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .question-chip { min-height: 38px; flex: 0 0 auto; }
  .composer { display: none; }
  .mobile-compose-bar { position: fixed; left: 10px; right: 10px; bottom: 76px; z-index: 35; min-height: 61px; padding: 9px 9px 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); background: rgba(255,255,255,.94); border: .5px solid rgba(60,60,67,.16); border-radius: 17px; box-shadow: 0 10px 30px rgba(28,28,30,.15); backdrop-filter: blur(20px) saturate(180%); }
  .mobile-compose-bar div { min-width: 0; }
  .mobile-compose-bar span, .mobile-compose-bar b { display: block; }
  .mobile-compose-bar span { color: #8e8e93; font-size: 8px; }
  .mobile-compose-bar b { margin-top: 4px; max-width: 220px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
  .mobile-compose-bar button { min-width: 76px; height: 41px; border: 0; border-radius: 12px; color: #fff; background: #007aff; box-shadow: 0 4px 12px rgba(0,122,255,.22); font-size: 11px; font-weight: 750; }
  .pool-summary { grid-template-columns: repeat(3,1fr); gap: 6px; }
  .summary-card { padding: 11px; }
  .summary-card strong { font-size: 17px; }
  .inspiration-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left { display: grid; grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1/-1; width: 100%; height: 44px; font-size: 12px; }
  .filter-select { height: 42px; }
  .topic-card { grid-template-columns: 23px minmax(0,1fr); padding: 14px 12px; gap: 9px; }
  .topic-main h3 { font-size: 13px; line-height: 1.5; }
  .topic-actions { grid-column: 2; display: grid; grid-template-columns: auto 1fr 38px; gap: 6px; }
  .topic-actions button { min-height: 38px; font-size: 10px; }
  .topic-actions .more-button { width: 38px; padding: 0; }
  .selection-bar { left: 14px; right: 14px; bottom: 76px; min-width: 0; transform: none; }
  .form-grid, .shooting-script { grid-template-columns: 1fr; }
  .form-field.full, .script-block.full { grid-column: auto; }
  .shooting-body { padding: 22px 19px; }
  .modal-root { padding: 0; align-items: end; background: rgba(0,0,0,.28); }
  .modal { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
  .modal::before { content: ""; width: 36px; height: 5px; margin: 7px auto -3px; display: block; border-radius: 4px; background: rgba(60,60,67,.22); }
  .mobile-compose-modal { max-height: 88vh; }
  .mobile-sheet-head { padding-top: 14px; }
  .mobile-sheet-head p { margin: 0 0 3px; color: var(--green); font-size: 9px; }
  .mobile-compose-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .mobile-compose-body > .form-field textarea { min-height: 88px; font-size: 14px; }
  .form-field input, .form-field textarea, .form-field select { min-height: 44px; padding: 11px 12px; border-radius: 12px; background: #f7f7fa; font-size: 12px; }
  .primary-button, .secondary-button, .ghost-button { min-height: 44px; }
  .action-sheet, .workspace-menu { border-radius: 22px 22px 0 0; }
  .action-list button { min-height: 62px; }
  .sheet-cancel { min-height: 48px; margin-bottom: calc(8px + env(safe-area-inset-bottom)); }
  #modal-root:has(.confirm-modal) { align-items: center; padding: 24px; }
  .confirm-modal { width: min(350px,100%); border-radius: 18px; }
  .confirm-modal::before { display: none; }
  .confirm-sheet { padding: 25px 20px 18px; }
  .confirm-actions button { min-height: 44px; }
  .shooting-modal { height: 100vh; max-height: 100vh; border-radius: 0; }
  .icp-footer { margin-top: 18px; padding-bottom: 8px; }
  button:active { transform: scale(.97); }
}
