/* GPT_PETAL_V3 — opt-in palette and presentation. Schedule deliberately excluded. */
html[data-skin="petal"] {
  --petal-bg:#f5efdb; --petal-chat:#f2dfdf; --petal-paper:#fbf6ea;
  --petal-panel:#fffaf5; --petal-ink:#493a38; --petal-muted:#776160;
  --petal-pink:#edbbcf; --petal-accent:#d89ab5; --petal-edge:#e7d8d4;
  --petal-ai:#fbf6ea; --petal-ai-ink:#493a38; --petal-dock:58px;
  --petal-bottom:max(2px,calc(env(safe-area-inset-bottom) - 8px));
  --petal-glass:rgba(251,246,222,.8);
  --petal-serif:'Cormorant Garamond','Noto Serif SC','Songti SC','STSong',Georgia,serif;
}
html[data-skin="petal"][data-petal-tone="dark"] {
  --petal-bg:#242123; --petal-chat:#262326; --petal-paper:#303030;
  --petal-panel:#242224; --petal-ink:#f4e2dd; --petal-muted:#c7afb9;
  --petal-pink:#e8b8c5; --petal-accent:#db7191; --petal-edge:#514349;
  --petal-glass:rgba(57,49,51,.82); --petal-ai:#efefef; --petal-ai-ink:#282326;
}
html[data-skin="petal"] :is(#home,#chat,#drawer,#petalDock,#petalAdd,#modelSheet,#picSheet,#thoughtSheet,#bellSheet,#ckSheet,#usgSheet,.petal-surface) {
  --bg-primary:var(--petal-bg); --bg-surface:var(--petal-paper); --bg-sunken:var(--petal-chat);
  --text-primary:var(--petal-ink); --text-secondary:var(--petal-muted); --text-faint:var(--petal-muted);
  --accent:var(--petal-accent); --accent-hover:var(--petal-muted); --border:var(--petal-edge);
  --claude-sidebar-bg:var(--petal-paper); --claude-text-primary:var(--petal-ink);
  --claude-text-secondary:var(--petal-muted); --claude-text-muted:var(--petal-muted);
  --claude-recents-label-color:var(--petal-muted); --claude-recents-text-color:var(--petal-ink);
  --claude-selected-bg:var(--petal-chat); --claude-new-chat-bg:var(--petal-pink); --claude-new-chat-text:#493a38;
  color:var(--petal-ink);
}
html[data-skin="petal"] #home {background:var(--petal-bg)!important}
html[data-skin="petal"] #home .home-inner {padding-bottom:calc(100px + env(safe-area-inset-bottom));gap:16px}
.petal-home-heading {display:none}
html[data-skin="petal"] .petal-home-heading {display:block;margin:0 4px 10px}
html[data-skin="petal"] .petal-home-heading div {text-transform:uppercase;letter-spacing:.18em;font-size:10px;color:var(--petal-muted)}
html[data-skin="petal"] .petal-home-heading h1 {font:400 34px/1.15 var(--petal-serif);letter-spacing:-.03em;margin:10px 0 0}
html[data-skin="petal"] #home .home-panel {padding:24px}
html[data-skin="petal"] #home :is(.home-welcome,.home-since,.home-quote-text,.home-quote-author) {text-align:left}
html[data-skin="petal"] #home .home-counter {justify-content:flex-start}
html[data-skin="petal"] #home :is(.home-panel,.home-grid-card) {background:var(--petal-paper)!important;border:1px solid var(--petal-edge);box-shadow:0 6px 22px #493a3808;border-radius:26px;color:var(--petal-ink)}
html[data-skin="petal"] #home .home-panel:nth-child(2) {background:var(--petal-chat)!important}
html[data-skin="petal"] #home :is(.card-heart,.home-chat-card,[data-page="trace"],[data-page="memory"],[data-page="settings"]) {display:none!important}
html[data-skin="petal"] #home .home-grid {gap:12px}
html[data-skin="petal"] #home .home-grid-card {min-height:124px;padding:20px}
html[data-skin="petal"] #home .home-grid-card:nth-child(3n+2) {background:var(--petal-chat)!important}
html[data-skin="petal"] #home :is(.home-grid-sub,.home-grid-icon,.home-rule,.home-since,.home-quote-author) {color:var(--petal-muted)!important}
html[data-skin="petal"] #home .home-counter {background:none!important;box-shadow:none!important}
html[data-skin="petal"] #chatBg {background:var(--petal-chat)!important}
html[data-skin="petal"] #chat {background:transparent}
html[data-skin="petal"] #chat .topbar {display:flex;gap:5px;align-items:center;padding:max(0px,calc(env(safe-area-inset-top) - 14px)) 12px 0;height:calc(44px + env(safe-area-inset-top));background:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;mask-image:none!important;-webkit-mask-image:none!important;border:0;box-shadow:none}
html[data-skin="petal"] #chat .topbar::before,html[data-skin="petal"] #chat .topbar::after {display:none!important}
html[data-skin="petal"] #chat .topbar-center {flex:0 1 auto;min-width:0;gap:0;background:var(--petal-glass);backdrop-filter:blur(22px) saturate(1.1);-webkit-backdrop-filter:blur(22px) saturate(1.1);border:1px solid var(--petal-edge);border-radius:18px;padding:4px 12px;box-shadow:0 3px 10px #493a3809}
html[data-skin="petal"] #chat .topbar-name {font-size:14px;line-height:20px;color:var(--petal-ink)}
html[data-skin="petal"] #topbarStatus {display:none}
html[data-skin="petal"] #chat .topbar-right-group {margin-left:auto;gap:4px}
html[data-skin="petal"] #chat :is(.topbar-hamburger,.topbar-icon-btn) {position:relative;width:40px;height:40px;min-width:40px;flex:none;background:none!important;box-shadow:none;border:0;color:var(--petal-muted);isolation:isolate}
html[data-skin="petal"] #chat :is(.topbar-hamburger,.topbar-icon-btn)::before {content:'';position:absolute;inset:3px;background:var(--petal-glass);backdrop-filter:blur(22px) saturate(1.1);-webkit-backdrop-filter:blur(22px) saturate(1.1);border:1px solid var(--petal-edge);border-radius:50%;z-index:-1;box-shadow:0 3px 10px #493a3809}
html[data-skin="petal"] #chat :is(.topbar-hamburger,.topbar-icon-btn) svg {width:17px;height:17px;stroke-width:1.5}
html[data-skin="petal"] #ctxMeter {accent-color:var(--petal-accent)}
html[data-skin="petal"] #stream {margin:calc(46px + env(safe-area-inset-top)) 12px calc(var(--petal-composer-height,112px) + var(--petal-dock) + var(--petal-bottom));padding:18px 12px 24px!important;border-radius:32px;background:var(--petal-panel);box-shadow:0 8px 22px #493a3808;transition:margin .28s ease,border-radius .28s ease}
html[data-skin="petal"] #stream .stream-inner {min-height:0!important;padding-bottom:0}
html[data-skin="petal"][data-chat-own] #stream {background-image:var(--chat-own-wallpaper)!important;background-size:cover;background-position:center;background-repeat:no-repeat}
html[data-skin="petal"] #chat .composer-wrap {background:none!important;padding:0 12px calc(var(--petal-dock) + var(--petal-bottom));}
html[data-skin="petal"] #chat .composer-box {background:var(--petal-paper)!important;border:1px solid var(--petal-edge)!important;border-radius:25px!important;padding:4px 14px 2px;box-shadow:0 5px 18px #493a3810!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-skin="petal"] #chat :is(#input,.composer-tools,#modelCapsuleButton) {color:var(--petal-ink)}
html[data-skin="petal"] #chat #input::placeholder {color:var(--petal-muted)}
html[data-skin="petal"] #chat :is(#fileAttachBtn,#bellBtn) {display:none!important}
html[data-skin="petal"] #chat .composer-tool-btn {min-width:40px;min-height:40px;color:var(--petal-muted)}
html[data-skin="petal"] #chat #modelCapsuleButton {opacity:1;min-height:40px;min-width:0;overflow:hidden;font-size:12px}
html[data-skin="petal"] #modelCapsuleText {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-skin="petal"] #jumpLatest {bottom:calc(var(--petal-composer-height,112px) + var(--petal-dock) + var(--petal-bottom) + 12px)}
/* Preserve native split-bubble DOM, widths, gap and timestamp order. Only the md paints a bubble. */
html[data-skin="petal"] #streamInner .msg-body {max-width:80%}
html[data-skin="petal"] #streamInner :is(.bubble,.md) {font-family:var(--font-sans)!important;font-size:15px!important;line-height:1.55!important;border-radius:22px!important;padding:4px 15px!important;min-height:0!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important;border:0!important}
html[data-skin="petal"] #streamInner .bubble {background:var(--bub-me,var(--petal-pink))!important;color:var(--bub-me-ink,#493a38)!important}
html[data-skin="petal"] #streamInner .msg-claude .md {background:var(--bub-you,var(--petal-ai))!important;color:var(--bub-you-ink,var(--petal-ai-ink))!important;align-self:flex-start;margin-top:0!important}
/* GPT_CHAT_BUBBLE_TEXT_V4 */
html[data-skin="petal"] #streamInner .msg-user .bubble,
html[data-skin="petal"] #streamInner .msg-claude .md {
  font-size:14px!important;
  padding-block:6px!important;
}
html[data-skin="petal"] #streamInner .ai-bubble {padding:0!important;min-height:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-skin="petal"] #streamInner .ai-bubble > .thinking-summary {font:italic 400 12px/1.4 var(--petal-serif)!important;color:var(--petal-muted)!important;min-height:40px;gap:7px;max-width:100%;padding:0!important;margin:0 0 8px!important;opacity:1!important}
html[data-skin="petal"] #streamInner .thinking-summary-text {font:inherit!important;color:inherit!important}
html[data-skin="petal"] #streamInner .thinking-chevron {width:13px;height:13px;transition:transform .2s}
html[data-skin="petal"] #streamInner .thinking-summary[aria-expanded="true"] .thinking-chevron {transform:rotate(90deg)}
html[data-skin="petal"] .petal-inline-thought {white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.8 var(--petal-serif);color:var(--petal-muted);padding:0 4px 16px 21px}
html[data-skin="petal"] #streamInner .msg-time {font:italic 400 13.5px/1 var(--petal-serif)!important;letter-spacing:.06em;color:var(--petal-muted)!important;opacity:1!important;text-shadow:none;margin-top:8px}
html[data-skin="petal"] #streamInner .md:empty {display:none!important}
html[data-skin="petal"] #streamInner .md p {margin:0}
html[data-skin="petal"] #streamInner .md p+p {margin-top:1em}
html[data-skin="petal"][data-petal-layout="classic"] #stream {margin:0;border-radius:0;padding:calc(46px + env(safe-area-inset-top)) 16px calc(var(--petal-composer-height,112px) + env(safe-area-inset-bottom) + 16px)!important;box-shadow:none}
html[data-skin="petal"][data-petal-layout="classic"] #chat .composer-wrap {padding-bottom:max(0px,calc(env(safe-area-inset-bottom) - 14px))}
html[data-skin="petal"][data-petal-layout="classic"] #jumpLatest {bottom:calc(var(--petal-composer-height,112px) + env(safe-area-inset-bottom) + 18px)}
html[data-skin="petal"].kb-open #chat .composer-wrap {padding-bottom:2px}
html[data-skin="petal"].kb-open:not([data-petal-layout="classic"]) #stream {margin-bottom:calc(var(--petal-composer-height,112px) + 8px)}
html[data-skin="petal"].kb-open #jumpLatest {bottom:calc(var(--petal-composer-height,112px) + 12px)}
/* Real native panels: palette only, no typography or structure changes. */
html[data-skin="petal"] .petal-surface {background:var(--petal-bg)!important;color:var(--petal-ink)!important}
html[data-skin="petal"] .petal-surface :is(.settings-card,.profile-card,.profile-nav-row,.profile-memory-card,.profile-preferences-card,.wnd-card,.wnd-tabs,.tn-row,.lt-env,.kp-card,.mm-card:not(.has-bg),.nt-card,.pulse-now-box) {background:var(--petal-paper)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"] .petal-surface :is(.settings-title,.settings-row-title,.profile-title,.profile-name-input,.profile-memory-textarea,.profile-preferences-textarea,.profile-nav-row-title,.wnd-title,.kp-title,.ks-title) {color:var(--petal-ink)!important}
html[data-skin="petal"] .petal-surface :is(.settings-section-title,.settings-row-desc,.profile-subtitle,.profile-help-text,.profile-section-title,.profile-nav-row-note,.wnd-sub) {color:var(--petal-muted)!important}
html[data-skin="petal"] .petal-surface :is(.settings-row-icon,.profile-mini-button,.profile-round-button,.profile-back-button,.profile-save-button) {background:var(--petal-chat)!important;color:var(--petal-ink)!important}
html[data-skin="petal"] .petal-surface :is(.mem-tabs,.mem-tab,.ob-nav-item,.ob-card,.ob-search-bubble,.ob-filter-pill,.ob-detail-sheet,.wnd-here,.settings-back) {background:var(--petal-paper)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"] #memoryPanel :is(.mem-tab.active,.ob-nav-item.active,.ob-filter-pill.active) {background:var(--petal-pink)!important;color:#493a38!important}
html[data-skin="petal"] #memoryPanel :is(.ob-search-input,.ob-card-name,.ob-detail-content) {color:var(--petal-ink)!important}
html[data-skin="petal"] #memoryPanel :is(.ob-status-text,.ob-empty,.ob-loading,.ob-card-preview,.ob-card-meta,.ob-nav-item small,.ob-search-icon) {color:var(--petal-muted)!important}
html[data-skin="petal"] #memoryPanel .ob-nav-item.active small {color:#493a38!important}
html[data-skin="petal"] #memoryPanel .ob-search-input::placeholder {color:var(--petal-muted)!important}
html[data-skin="petal"] .petal-surface .wnd-dot {background:var(--petal-accent);box-shadow:none}
html[data-skin="petal"] #tracePanel .trs-stat {background:var(--petal-paper)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"] #tracePanel .trs-stat-n {color:var(--petal-accent)!important}
html[data-skin="petal"] #tracePanel .trs-stat-k {color:var(--petal-muted)!important}
html[data-skin="petal"] :is(#settingsRoot,#tracePanel .wnd-scroll,#memoryPanel .profile-page) {padding-bottom:calc(100px + env(safe-area-inset-bottom))}
html[data-skin="petal"] #drawer {background:var(--petal-paper)!important}
html[data-skin="petal"] :is(#modelSheet,#picSheet,#thoughtSheet,#bellSheet,#ckSheet,.usg-sheet-box) {background:var(--petal-paper)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"] #thoughtContent {color:var(--petal-ink)}
html[data-skin="petal"] :is(#modelSheet,#picSheet,#thoughtSheet,#bellSheet,#ckSheet) .sheet-title {color:var(--petal-ink)!important}
html[data-skin="petal"] :is(#modelSheet,#picSheet,#thoughtSheet,#bellSheet,#ckSheet) .icon-button {background:var(--petal-chat)!important;color:var(--petal-ink)!important;min-width:40px;min-height:40px}
/* Dock uses actual route buttons; absent outside this theme and in full-screen subpages. */
#petalDock,#petalAdd,.petal-inline-thought {display:none}
html[data-skin="petal"] .petal-inline-thought:not([hidden]) {display:block}
html[data-skin="petal"] #petalDock:not([hidden]) {position:fixed;z-index:90;bottom:var(--petal-bottom);left:50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:440px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:4px;background:var(--petal-paper);border:1px solid var(--petal-edge);border-radius:28px;box-shadow:0 7px 20px #493a3810}
html[data-skin="petal"] #petalDock button {height:46px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font:11px var(--font-sans);color:var(--petal-muted);border-radius:26px}
html[data-skin="petal"] #petalDock button[aria-current="page"] {background:var(--petal-chat);color:var(--petal-ink)}
html[data-skin="petal"] #petalDock svg {width:20px;height:20px}
html[data-skin="petal"] #petalAdd[open] {display:block;position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,480px);max-width:100%;min-height:56dvh;max-height:85dvh;overflow:auto;padding:0 22px calc(24px + env(safe-area-inset-bottom));border:1px solid var(--petal-edge);border-bottom:0;border-radius:32px 32px 0 0;background:var(--petal-panel);color:var(--petal-ink);box-shadow:0 -8px 38px #493a3815}
html[data-skin="petal"] #petalAdd::backdrop {background:#29202544;backdrop-filter:blur(5px)}
html[data-skin="petal"] #petalAdd .petal-handle {display:block;width:100%;height:32px;touch-action:none;cursor:grab}
.petal-handle::after {content:'';display:block;width:36px;height:4px;border-radius:4px;margin:auto;background:var(--petal-muted);opacity:.3}
.petal-add-head {display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;font-size:15px}
.petal-add-head button {width:40px;height:40px;font-size:24px}
.petal-add-row {width:100%;display:flex;align-items:center;gap:14px;min-height:52px;text-align:left;font-size:14px;border-bottom:1px solid var(--petal-edge)}
.petal-add-row svg {width:19px;height:19px;flex:none;color:var(--petal-muted)}
.petal-add-row small {margin-left:auto;color:var(--petal-muted)}
.petal-model-label {font-size:11px;letter-spacing:.12em;color:var(--petal-muted);margin:16px 0 10px}
.petal-model-rail {display:flex;gap:5px;padding:5px;background:var(--petal-chat);border-radius:18px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;touch-action:pan-x;cursor:grab}
.petal-model-rail button {flex:0 0 90px;min-height:68px;padding:10px;font-size:13px;border-radius:14px;color:var(--petal-ink)}
.petal-model-rail button[aria-pressed="true"] {background:var(--petal-paper);box-shadow:0 2px 8px #493a3809}
.petal-effort button {flex:1 0 65px;min-height:48px;padding:8px 5px}
.petal-model-note {font-size:12px;line-height:1.6;color:var(--petal-muted);margin:14px 0}
@media(prefers-reduced-motion:reduce) {html[data-skin="petal"] #stream {transition:none}}

/* GPT_PETAL_V3 — neutralize native dark ink/cards locally, including generated Settings rows.
   Do not change data-theme/data-chat-bg: other themes, saved color mode and Schedule retain their state. */
html[data-skin="petal"] {color-scheme:light;background:var(--petal-bg)!important}
html[data-skin="petal"][data-petal-tone="dark"] {color-scheme:dark}
html[data-skin="petal"]:has(#chat:not(.hidden)) {background:var(--petal-chat)!important}
html[data-skin="petal"][data-petal-layout="classic"]:has(#chat:not(.hidden)) {background:var(--petal-panel)!important}
html[data-skin="petal"] body {background:inherit!important}
/* KB_FIX_V2 keeps chatBg full-height when the foreground shrinks. Match that canvas in Classic. */
html[data-skin="petal"][data-petal-layout="classic"] #chatBg {background:var(--petal-panel)!important}
html[data-skin="petal"][data-petal-layout="classic"][data-chat-own] #chatBg {background-image:var(--chat-own-wallpaper)!important}
/* WALL_PIN_V1（11.15 她说打字键盘弹上来壁纸也跟着动）：经典排版里 #stream 跟键盘一起变矮，铺在它身上的 cover 壁纸会重新缩放。
   经典排版本来就是整屏铺，壁纸只交给 #chatBg（不跟键盘缩），#stream 退透明；液态玻璃会自己退到 #chatBg 取图。 */
html[data-skin="petal"][data-petal-layout="classic"][data-chat-own] #chat #stream {background-image:none!important;background-color:transparent!important}
/* WALL_PIN_V2（11.15 她说别改壁纸大小）：#chatBg 不铺整屏，框成 #stream 在键盘没起来时的那块（JS 量了写进 --pw-*），
   跟原来铺在 #stream 上一模一样的大小和位置；键盘起来不重量，所以不动。 */
html[data-skin="petal"][data-petal-layout="classic"][data-chat-own][data-pw] #chatBg {inset:auto!important;top:var(--pw-top)!important;left:var(--pw-left)!important;width:var(--pw-w)!important;height:var(--pw-h)!important;
  background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}
html[data-skin="petal"][data-petal-layout="classic"][data-chat-own]:not([data-pw]) #chatBg {background-position:center!important}
html[data-skin="petal"] #chat .composer-tools {padding:0}
html[data-skin="petal"] #chat .composer-box :is(.composer,.composer-input-row,.composer-tools) {background:transparent!important}

/* Module-owned palettes (receipt, journal, dream, memory, keepsakes) must follow Petal's tone. */
html[data-skin="petal"][data-petal-tone] :is(.petal-surface,#drawer,.sheet,#usgSheet,#ctxSheet,#ckTicketDialog) {
  --text-primary:var(--petal-ink);--text-secondary:var(--petal-muted);--text-faint:var(--petal-muted);
  --rc-paper:var(--petal-paper);--rc-ink:var(--petal-ink);--rc-faded:var(--petal-muted);--rc-veryfaded:var(--petal-muted);
  --rc-stamp:var(--petal-ink);--rc-rule:var(--petal-muted);--rc-rule-soft:var(--petal-edge);
  --cl-bg:var(--petal-bg);--cl-card:var(--petal-paper);--cl-ink:var(--petal-ink);--cl-soft:var(--petal-muted);--cl-faint:var(--petal-muted);
  --dr-bg:var(--petal-bg);--dr-card:var(--petal-paper);--dr-ink:var(--petal-ink);--dr-soft:var(--petal-muted);--dr-faint:var(--petal-muted);--dr-edge:var(--petal-edge);
  --hs-paper:var(--petal-paper);--hs-paper2:var(--petal-chat);--hs-ink:var(--petal-ink);--hs-soft:var(--petal-muted);--hs-faint:var(--petal-muted);
  --nb-paper:var(--petal-paper);--nb-ink:var(--petal-ink);--nb-soft:var(--petal-muted);--nb-faint:var(--petal-muted);
  --kp-paper:var(--petal-paper);--kp-ink:var(--petal-ink);--kp-faint:var(--petal-muted);
  --mp-paper:var(--petal-paper);--mp-paper-2:var(--petal-chat);--mp-ink:var(--petal-ink);--mp-ink-2:var(--petal-muted);--mp-ink-3:var(--petal-muted);
  --tw-paper:var(--petal-paper);--tw-ink:var(--petal-ink);--tw-soft:var(--petal-muted);--tw-faint:var(--petal-muted);
}
/* Text-bearing UI elements only; preserve SVG artwork, uploaded content and chat message formatting. */
html[data-skin="petal"][data-petal-tone] :is(.petal-surface,#drawer,.sheet,#usgSheet,#ctxSheet) :is(div,span,p,label,button,input,textarea,select,option,h1,h2,h3,h4,h5,h6,strong,b,em,small,a,summary,li,td,th,pre,code):not(.skin-card .sw *,[data-paper] *,svg *,iframe *) {
  color:var(--petal-ink)!important;-webkit-text-fill-color:currentColor;text-shadow:none;
}
html[data-skin="petal"][data-petal-tone] :is(.petal-surface,#drawer,.sheet,#usgSheet,#ctxSheet) :is(input,textarea)::placeholder {color:var(--petal-muted)!important;-webkit-text-fill-color:currentColor;opacity:1}
html[data-skin="petal"][data-petal-tone] :is(.petal-surface,#drawer,.sheet,#usgSheet,#ctxSheet) :is([class$="-desc"],[class$="-sub"],[class$="-meta"],[class$="-hint"],[class$="-note"],[class$="-label"],[class$="-time"],.settings-row-value,.settings-row-chevron,.rc-date,.rc-brand,.rc-row.faded,.ck-receipt-meta,.ck-receipt-number) {color:var(--petal-muted)!important;opacity:1}
html[data-skin="petal"][data-petal-tone] :is(.petal-surface,#drawer,.sheet) :is([class$="-title"],[class$="-name"],.settings-stat-value,.pv-hero-v,.model-name,.rc-title) {opacity:1}

/* Native black/gray cards, forms and selected tabs become paper or dusty rose in this theme. */
html[data-skin="petal"][data-petal-tone] .petal-surface :is(.settings-stat-card,.settings-provider-tabs,.settings-provider-tab,.settings-input,.settings-select,.settings-textarea,.settings-btn,.settings-mode-card,.settings-model-item,.pv-card,.pv-hero,.pv-chip,.pv-ava,.rs-bcard,.mcp-card,.file-item,.project-card,.chat-card,.profile-empty,.profile-add-button,.profile-switch,.cal-day,.cal-day-sheet,.cal-person,.cal-event-input,.diary-month-pill,.diary-search-bubble,.memory-search-bubble,.dm-wish,.dm-wish-in,.dm-card,.nb-entry,.nb-chat,.nb-write textarea,.mm-chat-card,.mm-detail-card,.hs-cover,.hs-card,.hs-answer,.lt-tabs,.lt-fab,.kp-rv-c,.ks-cell,.pulse-tabs,.pulse-tab,.pulse-debug-block) {
  background:var(--petal-paper)!important;border-color:var(--petal-edge)!important;color:var(--petal-ink)!important;box-shadow:inset 0 0 0 1px var(--petal-edge)!important;
}
html[data-skin="petal"][data-petal-tone] .petal-surface :is(.settings-provider-tab.active,.settings-btn.primary,.settings-mode-card.active,.settings-toggle.on,.profile-switch.on,.profile-add-button,.lt-fab,.pulse-tab.active,.pv-chip,.settings-row-badge,.pv-ava) {background:var(--petal-chat)!important;color:var(--petal-ink)!important}
html[data-skin="petal"][data-petal-tone] :is(.usg-sheet-box,.ctx-sheet-box,.model-group,.model-group-item,.extended-row,.pic-option,.bell-mode,.bell-go,.ck-go,.ck-opt,.ck-entry,.ck-ticket-main,.ck-ticket-stub) {background:var(--petal-paper)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"][data-petal-tone] #ckSheet .rc-stamp {color:var(--petal-ink)!important;border-color:var(--petal-muted)!important}
html[data-skin="petal"][data-petal-tone] #ckTicketDialog {--rc-paper:var(--petal-paper)!important;--rc-ink:var(--petal-ink)!important;--rc-faded:var(--petal-muted)!important;--rc-stamp:var(--petal-ink)!important}
/* Paper thumbnails use their own paired foreground/background; do not recolor their artwork. */
html[data-skin="petal"][data-petal-tone] .petal-surface [data-paper] {color:var(--pp-ink,var(--petal-ink))!important}
/* Shared card families also cover features beyond the screenshots and their nested forms. */
html[data-skin="petal"][data-petal-tone] .petal-surface :is([class$="-card"],[class$="-box"],[class$="-item"],[class$="-bubble"],[class$="-input"],[class$="-textarea"],[class$="-tabs"]):not(.has-bg,[data-paper],.skin-card,.skin-card *,[data-paper] *) {
  background:var(--petal-paper)!important;border-color:var(--petal-edge)!important;color:var(--petal-ink)!important;
}
html[data-skin="petal"][data-petal-tone] .petal-surface :is([class$="-item"],[class$="-tab"],[class$="-card"]):is(.active,.on,.selected):not(.skin-card,[data-paper]) {background:var(--petal-chat)!important;color:var(--petal-ink)!important}

/* GPT_PETAL_V3 — chat details and component-owned surfaces missed by the shared palette. */
html[data-skin="petal"] #streamInner :is(.thinking-summary,.thinking-summary-text,.trace-row,.trace-row-text,.trace-row-summary,.thinking-row,.thinking-status-line,.bell-trace-txt) {font-size:12px!important}
html[data-skin="petal"] #streamInner :is(.trace-row-thinking-body,.trace-row-block,.thinking-live) {font-size:12px!important;line-height:1.6}
html[data-skin="petal"] #petalAdd {background:var(--petal-panel)!important;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-skin="petal"] #petalAdd :is(.petal-add-head,.petal-add-row,.petal-handle) {background:transparent!important;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-skin="petal"] #petalAdd::backdrop {background:#29202533;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
html[data-skin="petal"] #petalAdd .petal-add-row {min-height:56px}
html[data-skin="petal"] :is(#modelSheet,#picSheet) {height:100dvh;background:var(--petal-panel)!important;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-skin="petal"] :is(#modelSheet,#picSheet) :is(.sheet-head,.sheet-content) {background:transparent!important;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-skin="petal"] :is(#msgContextMenu,#sessionContextMenu,#sessionContextHighlight,.rename-dialog,.delete-confirm-popover) {
  --claude-context-menu-bg:var(--petal-paper);--claude-context-menu-edge-bg:var(--petal-paper);
  --claude-context-text-primary:var(--petal-ink);--claude-context-highlight-text:var(--petal-ink);
  --claude-context-highlight-bg:var(--petal-paper);--claude-context-delete:#a34256;
  background:var(--petal-paper)!important;color:var(--petal-ink)!important;border:1px solid var(--petal-edge);
}
html[data-skin="petal"][data-petal-tone="dark"] :is(#msgContextMenu,#sessionContextMenu) {--claude-context-delete:#f0a7bb}
html[data-skin="petal"] :is(#msgContextMenu,#sessionContextMenu)::before {background:none}
html[data-skin="petal"] :is(#msgContextMenu,#sessionContextMenu) .context-menu-item {color:var(--petal-ink)!important}
html[data-skin="petal"] :is(#msgContextMenu,#sessionContextMenu) :is(.context-menu-del,.delete) {color:var(--claude-context-delete)!important}
html[data-skin="petal"] :is(.rename-dialog,.delete-confirm-popover) :is(input,button,div) {color:var(--petal-ink)!important}
html[data-skin="petal"] :is(.rename-input,.rename-action,.delete-confirm-button) {background:var(--petal-chat)!important}

/* Tonight: blush book cover and individual paper cards; native month/lock/open handlers stay intact. */
html[data-skin="petal"][data-petal-tone] #tonightPanel .tn-cover {background:var(--petal-chat)!important;color:var(--petal-ink)!important;border:1px solid var(--petal-edge);box-shadow:inset 5px 0 0 var(--petal-edge),0 8px 22px #493a3810;border-radius:12px 24px 24px 12px}
html[data-skin="petal"] #tonightPanel .tn-cover::before {display:none}
html[data-skin="petal"] #tonightPanel .tn-cover::after {background:var(--petal-muted);opacity:.22;box-shadow:none;width:6px}
html[data-skin="petal"] #tonightPanel .tn-cover-frame,html[data-skin="petal"] #tonightPanel .tn-cover-frame::before {border-color:var(--petal-muted)}
html[data-skin="petal"] #tonightPanel :is(.tn-cover-t,.tn-cover-s,.tn-cover-stat,.tn-cover-stat b,.tn-cover-note) {color:var(--petal-ink)!important;text-shadow:none;opacity:1}
html[data-skin="petal"][data-petal-tone] #tonightPanel .tn-page {display:flex;gap:14px;margin:12px 0;padding:16px;min-height:110px;background:var(--petal-paper)!important;border:1px solid var(--petal-edge);border-radius:20px;box-shadow:0 4px 14px #493a3808}
html[data-skin="petal"] #tonightPanel .tn-page::before,html[data-skin="petal"] #tonightPanel .tn-page::after {display:none}
html[data-skin="petal"] #tonightPanel .tn-date {flex:0 0 56px;width:56px;padding:10px 4px;background:var(--petal-chat);border:0;border-radius:14px;align-self:center}
html[data-skin="petal"] #tonightPanel .tn-d {font-size:28px}
html[data-skin="petal"] #tonightPanel .tn-body {gap:7px;padding-top:3px;padding-bottom:3px}
html[data-skin="petal"] #tonightPanel .tn-t {font-size:15px;line-height:1.5;padding-right:10px}
html[data-skin="petal"] #tonightPanel .tn-mood {font-size:12.5px}
html[data-skin="petal"] #tonightPanel .tn-sub {font-size:11px}
html[data-skin="petal"] #tonightPanel .tn-open-mark {right:12px;width:10px;height:22px;background:var(--petal-accent)}
html[data-skin="petal"] #tonightPanel .tn-seal {background:var(--petal-chat);color:var(--petal-ink);box-shadow:inset 0 0 0 1px var(--petal-edge)}
html[data-skin="petal"] #tonightPanel .tn-month {min-height:40px;margin:18px 2px 0}
html[data-skin="petal"] #tonightRead .tn-sheet {background-color:var(--petal-paper)!important;border-color:var(--petal-edge)}

/* Moments: full-height scrolling, a paper posting bar, and a full-screen compose view. */
html[data-skin="petal"][data-petal-tone] #momentsPanel {inset:0;height:100dvh;max-height:100dvh;background:var(--petal-bg)!important}
html[data-skin="petal"] #momentsPanel .moments-scroll {min-height:0;padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;scroll-padding-bottom:calc(96px + env(safe-area-inset-bottom))}
html[data-skin="petal"][data-petal-tone] #momentsPanel :is(.moments-top,.moments-search) {background:var(--petal-bg)!important;backdrop-filter:none;-webkit-backdrop-filter:none}


html[data-skin="petal"][data-petal-tone] #momentsCompose {inset:0;height:100dvh;max-height:100dvh;background:var(--petal-paper)!important}
html[data-skin="petal"] #momentsCompose .moments-compose-body {min-height:0;padding-bottom:calc(24px + env(safe-area-inset-bottom));scroll-padding-bottom:24px}
html[data-skin="petal"] #momentsCompose .moments-compose-top {background:var(--petal-paper)!important}
html[data-skin="petal"] #momentsPanel:has(#momentsCompose.show) .moments-bottom {visibility:hidden;pointer-events:none}

/* Notes and reel detail use named paper layers rather than the shared -card family. */
html[data-skin="petal"][data-petal-tone] :is(#murmurPanel,#notebookPanel,#mmDetail) :is(.mm-detail-card,.mm-chat-card,.nb-chat,.nb-passage,.nb-entry,.note-compose,#noteIn,#mmSearchIn,.nt-card) {background-color:var(--petal-paper)!important;border-color:var(--petal-edge)!important;color:var(--petal-ink)!important;box-shadow:0 0 0 1px var(--petal-edge)}
html[data-skin="petal"] :is(#murmurPanel,#notebookPanel,#mmDetail) :is(.mm-detail-card,.mm-chat-card,.nb-chat,.nb-entry,.nt-card):not(.has-bg) {background-image:none!important}
html[data-skin="petal"] :is(#murmurPanel,#mmDetail) .has-bg::before {background:color-mix(in srgb,var(--petal-paper) 84%,transparent)!important}
html[data-skin="petal"] #mmDetail :is(.mm-detail-card,.mm-detail-card *) {color:var(--petal-ink)!important}
html[data-skin="petal"] #mmDetail .mm-detail-act {background:var(--petal-chat)!important}
html[data-skin="petal"] #mmSettingsSheet {background:var(--petal-paper)!important;color:var(--petal-ink)!important}
html[data-skin="petal"] #mmSettingsSheet .mm-set-btn {background:var(--petal-chat)!important;color:var(--petal-ink)!important}
html[data-skin="petal"][data-petal-tone] :is(#keptPanel,#reelDetail) :is(.rl-paper,.rl-d-paper,.rl-tk,.rl-day,.rl-d-tkall,.rl-att) {background:var(--petal-paper)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"][data-petal-tone] #reelDetail .rl-m.a .rl-b {background:var(--petal-chat)!important;color:var(--petal-ink)!important}
html[data-skin="petal"][data-petal-tone] #reelDetail .rl-m.u .rl-b {background:var(--petal-pink)!important;color:#493a38!important}
html[data-skin="petal"][data-petal-tone] #reelDetail .rl-m.u .rl-b * {color:#493a38!important}
html[data-skin="petal"] #reelDetail .rl-tk::before {background:var(--petal-paper)!important}
html[data-skin="petal"] :is(#rlBar,#rlSave .kp-sheet) {background:var(--petal-paper)!important;color:var(--petal-ink)!important}

/* Twine cards follow the palette; the existing interactive night-sky artwork keeps its own contrast. */
html[data-skin="petal"][data-petal-tone] #timelinePanel :is(.tw-today,.tw-row,.tw-ent,.tw-stat,.tw-sky-cap) {background:var(--petal-paper)!important;color:var(--petal-ink)!important;border:1px solid var(--petal-edge);box-shadow:0 4px 18px #493a3808}
html[data-skin="petal"] #timelinePanel .tw-today::before {background:none;animation:none;border:1px dashed var(--petal-edge);inset:6px;border-radius:16px}
html[data-skin="petal"] #timelinePanel .tw-today::after {opacity:.12}
html[data-skin="petal"] #timelinePanel .tw-btn {background:var(--petal-chat)!important;color:var(--petal-ink)!important;box-shadow:inset 0 0 0 1px var(--petal-edge)}
html[data-skin="petal"][data-petal-tone] #timelinePanel #twSky :is(.tw-sky-sub,.tw-sky-sub small,.tw-sky-hint,.tw-sky-ui button) {color:#f4e2dd!important}
html[data-skin="petal"] #timelinePanel .tw-sky-cap * {color:var(--petal-ink)!important}

html[data-skin="petal"] #timelinePanel .tw-ent::before {background:var(--petal-accent);box-shadow:none}
html[data-skin="petal"] #timelinePanel .tw-ent::after {background:none}

/* XY_PETAL_FIX_V1（10.30 小衍）— 她挑的那几处：顶栏一层黄磨砂、名字不斜、底栏薄一点、
   想法框铺满、停止键是方块、发送键下来、Keepsake 详情、Pulse、Trace 的点、Home。 */

/* 顶栏：原生按钮自带一层磨砂，GPT 又在上面盖了个黄圈 —— 合成一层黄磨砂。 */
/* TOP_FROST_V2（10.30 她说黄的不协调）：换回原来那种白磨砂，透着底下的颜色 */
html[data-skin="petal"] {--petal-frost:rgba(255,255,255,.34);--petal-frost-edge:rgba(255,255,255,.55)}
html[data-skin="petal"][data-petal-tone="dark"] {--petal-frost:rgba(255,255,255,.1);--petal-frost-edge:rgba(255,255,255,.14)}
html[data-skin="petal"] #chat :is(.topbar-hamburger,.topbar-icon-btn) {width:36px;height:36px;min-width:36px;margin:2px;border-radius:50%!important;background:var(--petal-frost)!important;backdrop-filter:blur(18px) saturate(1.5)!important;-webkit-backdrop-filter:blur(18px) saturate(1.5)!important;border:1px solid var(--petal-frost-edge)!important;box-shadow:0 3px 12px #493a380f,inset 0 1px 0 var(--petal-frost-edge)!important;color:var(--petal-ink)}
html[data-skin="petal"] #chat :is(.topbar-hamburger,.topbar-icon-btn)::before {display:none!important}
html[data-skin="petal"] #chat .topbar-center {background:var(--petal-frost)!important;backdrop-filter:blur(18px) saturate(1.5)!important;-webkit-backdrop-filter:blur(18px) saturate(1.5)!important;border:1px solid var(--petal-frost-edge)!important;box-shadow:0 3px 12px #493a380f,inset 0 1px 0 var(--petal-frost-edge)!important}
html[data-skin="petal"] #chat .topbar-name {font-style:normal!important;font-family:var(--font-sans)!important;font-weight:600;letter-spacing:.06em}

/* 底栏薄一点，对话框顺着往下长（--petal-dock 管着输入框和对话框的底边）。 */
html[data-skin="petal"] {--petal-dock:46px}
html[data-skin="petal"] #petalDock:not([hidden]) {padding:3px;border-radius:24px}
html[data-skin="petal"] #petalDock button {height:38px;gap:1px;font-size:10px;border-radius:20px}
html[data-skin="petal"] #petalDock svg {width:17px;height:17px}

/* 停止键：方块要看得见；发送键挪到下面那排右下角。 */
html[data-skin="petal"] #chat .composer-box {position:relative}
html[data-skin="petal"] #chat #send {position:absolute;z-index:5;right:9px;bottom:7px;width:34px;height:34px;min-width:34px;margin:0}
html[data-skin="petal"] #chat .composer-tools {padding-right:44px}
html[data-skin="petal"] #chat #send.stop-mode {opacity:1!important;background:var(--petal-ink)!important;color:var(--petal-paper)!important;box-shadow:0 3px 10px #493a3822!important}
html[data-skin="petal"] #chat #send.stop-mode svg {fill:currentColor!important;stroke:none!important;width:15px;height:15px}

/* 想法：从左铺到右，一个浅框，字横着走满。 */
html[data-skin="petal"] #streamInner .msg-claude .msg-body {max-width:100%}
html[data-skin="petal"] #streamInner .msg-claude .md {max-width:min(calc((100vw - 36px) * .9),640px)}   /* 10.30 她说气泡左右再长一点 */
html[data-skin="petal"] #streamInner .ai-bubble:has(> .thinking-summary) {width:100%;box-sizing:border-box}
html[data-skin="petal"] #streamInner .ai-bubble > .thinking-summary {width:100%;max-width:100%}
html[data-skin="petal"] .petal-inline-thought {box-sizing:border-box;width:100%;margin:0 0 12px;padding:12px 15px;text-align:left;font:13px/1.75 var(--font-sans);color:var(--petal-muted);background:color-mix(in srgb,var(--petal-chat) 55%,var(--petal-paper));border:1px solid var(--petal-edge);border-radius:16px}

/* Keepsake 点进去那页（原生暗色是黑的）。 */
html[data-skin="petal"] :is(#ksDetail,#ksPick) {background:var(--petal-bg)!important;background-image:none!important;color:var(--petal-ink)!important}
html[data-skin="petal"] :is(#ksDetail,#ksPick) .ks-d-top {background:var(--petal-bg)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"] :is(#ksDetail,#ksPick) .ks-d-back {color:var(--petal-accent)!important}
html[data-skin="petal"] #ksDetail .ks-d-img {border-radius:20px;box-shadow:0 8px 24px #493a3814}
html[data-skin="petal"] #ksDetail .ks-block {background:var(--petal-paper)!important;border:1px solid var(--petal-edge)!important;border-radius:18px;box-shadow:0 4px 14px #493a3808}
html[data-skin="petal"] #ksDetail :is(.ks-d-when,.ks-d-by,.ks-d-labelrow,.ks-block-label,.ks-block-text.faint) {color:var(--petal-muted)!important}
html[data-skin="petal"] #ksDetail :is(.ks-d-title,.ks-block-text:not(.faint)) {color:var(--petal-ink)!important}
html[data-skin="petal"] #ksDetail .ks-d-al {background:var(--petal-chat)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"] #ksDetail .ks-d-send {background:var(--petal-pink)!important;color:#493a38!important;border:0!important}
html[data-skin="petal"] #ksDetail :is(textarea,input) {background:var(--petal-paper)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}

/* Trace：点原来套了一圈暗色模式的黑边。 */
html[data-skin="petal"] #tracePanel .trs-blk {--trs-dot:var(--petal-pink)}
html[data-skin="petal"] #tracePanel .trs-blk.is-wake {--trs-dot:var(--petal-accent)}
html[data-skin="petal"] #tracePanel .trs-blk.is-out {--trs-dot:#e3a98d}
html[data-skin="petal"] #tracePanel .trs-blk.is-idle {--trs-dot:color-mix(in srgb,var(--petal-muted) 35%,var(--petal-paper))}
html[data-skin="petal"] #tracePanel .trs-blk::before {background:var(--trs-dot)!important;box-shadow:0 0 0 3px var(--petal-bg),0 0 0 4px var(--petal-edge)!important}
html[data-skin="petal"] #tracePanel .wnd-group-body::before {background:linear-gradient(180deg,var(--petal-pink),transparent)!important;opacity:.6}
html[data-skin="petal"] #tracePanel :is(.trs-t,.trs-why) {color:var(--petal-muted)!important}
html[data-skin="petal"] #tracePanel .trs-ic {background:var(--petal-chat)!important;color:var(--petal-accent)!important}

/* Pulse：花瓣底 + 纸卡，原生暗色规则带 id 和 !important，这里同样带上。 */
html[data-skin="petal"] #pulsePanel {background:radial-gradient(130% 42% at 50% 0%,color-mix(in srgb,var(--petal-pink) 42%,transparent),transparent 72%),var(--petal-bg)!important;color:var(--petal-ink)!important}
html[data-skin="petal"] #pulsePanel :is(div,span,p,b,strong,em,small,button,label,h1,h2,h3,li,input,textarea) {color:var(--petal-ink)!important;text-shadow:none!important}
html[data-skin="petal"] #pulsePanel :is(.pulse-card-en,.pulse-section-title,.pulse-cycle-desc,.pulse-cycle-remain,.pulse-now-k,.pulse-note,.pulse-hint,.pulse-log-time,.pulse-log-day,.pulse-log-why,.pulse-event-note,.pulse-event-remain,.pulse-want-note,.pulse-want-why,.pulse-want-k,.pulse-switch-note,.pulse-mine-sub,.pulse-mine-note,.pulse-body-label,.pulse-empty,.pulse-loading,.pulse-cal-range,.pulse-tab:not(.active)) {color:var(--petal-muted)!important;opacity:1!important}
html[data-skin="petal"] #pulsePanel .pulse-cycle-name {font:500 32px/1.2 var(--petal-serif)!important;letter-spacing:.08em}
html[data-skin="petal"] #pulsePanel .pulse-orb {background:radial-gradient(circle,color-mix(in srgb,var(--petal-pink) 75%,transparent) 0%,color-mix(in srgb,var(--petal-accent) 22%,transparent) 38%,transparent 66%)!important;opacity:.85}
html[data-skin="petal"] #pulsePanel .pulse-tabs {background:color-mix(in srgb,var(--petal-chat) 70%,var(--petal-paper))!important;border:1px solid var(--petal-edge)!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-skin="petal"] #pulsePanel .pulse-tab {background:transparent!important;box-shadow:none!important}
html[data-skin="petal"] #pulsePanel .pulse-tab.active {background:var(--petal-paper)!important;color:var(--petal-ink)!important;box-shadow:0 2px 8px #493a380d!important}
html[data-skin="petal"] #pulsePanel :is(.pulse-card,.pulse-switch,.pulse-debug-block,.pulse-log-row) {background:var(--petal-paper)!important;border:1px solid var(--petal-edge)!important;border-radius:20px;box-shadow:0 5px 18px #493a3809!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-skin="petal"] #pulsePanel .pulse-now-box {background:var(--petal-chat)!important;border:1px solid var(--petal-edge)!important;box-shadow:none!important}
html[data-skin="petal"] #pulsePanel .pulse-inner-rule {background:var(--petal-edge)!important}
html[data-skin="petal"] #pulsePanel .pulse-want {border-left-color:var(--petal-accent)!important}
html[data-skin="petal"] #pulsePanel :is(.pulse-fold-arrow,.pulse-chip,.profile-round-button) {background:var(--petal-chat)!important;color:var(--petal-ink)!important;border-color:var(--petal-edge)!important}
html[data-skin="petal"] #pulsePanel .pulse-btn {background:var(--petal-pink)!important;color:#493a38!important;border:0!important}
html[data-skin="petal"] #pulsePanel .pulse-btn-ghost {background:transparent!important;border:1px solid var(--petal-edge)!important}
html[data-skin="petal"] #pulsePanel .pulse-body-dot {background:var(--petal-accent)!important}
html[data-skin="petal"] #pulsePanel .pulse-scroll {padding-bottom:calc(env(safe-area-inset-bottom,0px) + 40px)}

html[data-skin="petal"] #ksDetail .kp-rv-new {background:var(--petal-paper)!important;border:1px solid var(--petal-edge)!important;box-shadow:none!important}
html[data-skin="petal"] #ksDetail .kp-rv-new textarea {background:transparent!important;border:0!important}
html[data-skin="petal"] #ksDetail .kp-rv-new :is(button,#ksRvGo) {background:var(--petal-pink)!important;color:#493a38!important}

/* XY_PETAL_HOME_V1（10.30）：她要首页照黑纱那版排 —— 一组一块、一行一间，卡片小。
   排版直接搬黑纱的 #home 规则（_rainHome 也给花瓣开了），颜色走花瓣的 --rn-* 变量。 */
html[data-skin="petal"][data-skin] {
  --rn-ink:var(--petal-ink);--rn-ink2:color-mix(in srgb,var(--petal-ink) 74%,transparent);
  --rn-ink3:var(--petal-muted);--rn-ink4:color-mix(in srgb,var(--petal-muted) 60%,transparent);
  --rn-lilac:var(--petal-pink);--rn-rose:var(--petal-accent);--rn-plum:var(--petal-chat);
  --rn-line:var(--petal-edge);--rn-edge:var(--petal-edge);--rn-edge2:var(--petal-edge);
  --rn-glass:var(--petal-paper);--rn-glass-solid:var(--petal-paper);--rn-blur:none;
  --rn-script:'Pinyon Script','Snell Roundhand',cursive;
  --rn-serif:'Cormorant Garamond','Noto Serif SC','Songti SC','STSong',Georgia,serif;
  --rn-cn:'Noto Serif SC','Songti SC','STSong','Cormorant Garamond',serif;
}
html[data-skin="petal"] #home,
html[data-skin="petal"] #gate{
  background-color:#0c0c0c!important;background-image:var(--chat-wallpaper)!important;
  background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;color:var(--rn-ink)!important}
html[data-skin="petal"] #home .rn-only{display:block!important}
html[data-skin="petal"] #home .home-inner{gap:0;padding:calc(env(safe-area-inset-top) + 34px) 20px calc(env(safe-area-inset-bottom) + 34px)}
html[data-skin="petal"] #home .card-heart,html[data-skin="petal"] #home .home-rule,html[data-skin="petal"] #home .home-grid-icon{display:none!important}
html[data-skin="petal"] #home .home-panel{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;border-radius:0;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-skin="petal"] #home .home-panel::before,html[data-skin="petal"] #home .home-panel::after{content:none!important}
html[data-skin="petal"] #home .rn-date{text-align:right;font:500 10.5px/1 var(--rn-serif);letter-spacing:.34em;color:var(--rn-ink2);margin:6px 0 0}
html[data-skin="petal"] #home .rn-hello{font:400 clamp(32px,10vw,44px)/1.3 var(--rn-script);color:var(--rn-ink);margin:24px 0 2px;text-shadow:0 2px 18px transparent}
html[data-skin="petal"] #home .home-welcome{text-align:left!important;font:400 15px/1.75 var(--rn-cn)!important;color:var(--rn-ink2)!important;margin:4px 0 0!important;letter-spacing:.04em}
html[data-skin="petal"] #home .home-counter{justify-content:flex-start!important;align-items:baseline;gap:14px;margin:22px 0 0;background:none!important}
html[data-skin="petal"] #home .home-counter::before,html[data-skin="petal"] #home .home-counter::after{content:none!important}
html[data-skin="petal"] #home .home-days{font:400 76px/1 var(--rn-script)!important;color:var(--rn-rose)!important;letter-spacing:0!important;text-shadow:0 4px 24px rgba(216,154,181,.25)}
html[data-skin="petal"] #home .home-days-unit{font-size:0!important;color:transparent}
html[data-skin="petal"] #home .home-days-unit::after{content:"DAYS TOGETHER";font:500 11px/1 var(--rn-serif);letter-spacing:.32em;color:var(--rn-ink2)}
html[data-skin="petal"] #home .home-since{text-align:left!important;margin:10px 0 0!important;font:500 10.5px/1 var(--rn-serif)!important;letter-spacing:.3em;text-transform:uppercase;color:var(--rn-ink3)!important}
html[data-skin="petal"] #home .home-mile{display:block!important;margin:8px 0 0;font:400 13px/1.6 var(--rn-cn);color:var(--rn-ink2);letter-spacing:.04em}
html[data-skin="petal"] #home .home-mile b{font:italic 500 17px/1 var(--rn-serif);color:var(--rn-rose);margin:0 1px}
html[data-skin="petal"] #home .rn-hush{display:flex!important;align-items:center;gap:14px;width:100%;margin:22px 0 0;padding:15px 2px;border-top:1px solid var(--rn-line);border-bottom:1px solid var(--rn-line);color:var(--rn-ink2);text-align:left}
html[data-skin="petal"] #home .rn-hush b{font:500 10.5px/1 var(--rn-serif);letter-spacing:.32em;color:var(--rn-ink)}
html[data-skin="petal"] #home .rn-hush span{flex:1;font:400 13px/1.4 var(--rn-cn);letter-spacing:.06em}
html[data-skin="petal"] #home .rn-hush em{font-style:normal;color:var(--rn-ink3)}
html[data-skin="petal"] #home .home-panel:nth-child(2){margin:24px 0 0!important;padding:0 4px 0 16px!important;border-left:1px solid rgba(216,154,181,.45)!important}
html[data-skin="petal"] #home .home-quote-text{text-align:left!important;font:400 15px/1.9 var(--rn-cn)!important;font-style:normal!important;color:var(--rn-ink)!important;letter-spacing:.03em}
html[data-skin="petal"] #home .home-quote-author{text-align:right!important;font:italic 400 14px/1 var(--rn-serif)!important;color:var(--rn-ink3)!important;margin-top:10px!important;letter-spacing:.04em}
html[data-skin="petal"] #home .home-chat-card{display:grid!important;grid-template-columns:auto 1fr auto;column-gap:12px;align-items:center;margin:26px 0 0!important;padding:11px 14px 11px 12px!important;border-radius:999px!important;
  background:linear-gradient(120deg,rgba(216,154,181,.20),rgba(199,199,199,.08) 55%,rgba(255,255,255,.04))!important;border:1px solid rgba(252,252,252,.2)!important;
  box-shadow:0 18px 40px -22px rgba(0,0,0,.75),inset 0 1px 0 rgba(255,255,255,.12)!important;backdrop-filter:var(--rn-blur)!important;-webkit-backdrop-filter:var(--rn-blur)!important}
html[data-skin="petal"] #home .home-chat-card .home-card-icon{grid-row:1/3;width:36px;height:36px;margin:0;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.08);border:1px solid var(--rn-edge)}
html[data-skin="petal"] #home .home-chat-card .home-card-icon svg{stroke:var(--rn-rose);width:18px;height:18px}
html[data-skin="petal"] #home .home-chat-card .home-card-title{grid-column:2;margin:0!important;font:italic 500 21px/1.05 var(--rn-serif)!important;color:var(--rn-ink)!important}
html[data-skin="petal"] #home .home-chat-card .home-card-sub{grid-column:2;margin:3px 0 0!important;font:400 12.5px/1.3 var(--rn-cn)!important;color:var(--rn-ink2)!important;letter-spacing:.08em}
html[data-skin="petal"] #home .home-chat-go{display:grid!important;place-items:center;grid-column:3;grid-row:1/3;width:30px;height:30px;border-radius:50%;color:var(--rn-ink);border:1px solid var(--rn-edge);background:rgba(255,255,255,.05)}
html[data-skin="petal"] #home .home-chat-go svg{width:15px;height:15px}
html[data-skin="petal"] #home .home-grid{gap:12px;margin-top:6px}
html[data-skin="petal"] #home .rn-group{display:flex!important;align-items:baseline;gap:10px;grid-column:1/-1;margin:26px 2px 2px;padding-bottom:10px;border-bottom:1px solid var(--rn-line)}
html[data-skin="petal"] #home .rn-group b{font:500 11px/1 var(--rn-serif);letter-spacing:.34em;color:var(--rn-ink)}
html[data-skin="petal"] #home .rn-group span{font:400 12px/1 var(--rn-cn);letter-spacing:.14em;color:var(--rn-ink3)}
html[data-skin="petal"] #home .rn-group i{margin-left:auto;font:italic 400 15px/1 var(--rn-serif);color:var(--rn-ink4)}
html[data-skin="petal"] #home .home-grid-card{position:relative;display:flex;flex-direction:column;min-height:136px;padding:14px 15px 13px!important;border-radius:20px!important;
  background:var(--rn-glass)!important;border:1px solid var(--rn-edge)!important;
  box-shadow:0 14px 30px -20px rgba(0,0,0,.8),inset 0 1px 0 rgba(255,255,255,.08)!important;
  backdrop-filter:var(--rn-blur)!important;-webkit-backdrop-filter:var(--rn-blur)!important;overflow:hidden}
html[data-skin="petal"] #home .home-grid-card::after{content:none!important}
html[data-skin="petal"] #home .home-grid-card::before{content:var(--rn-no,"");display:block!important;position:static!important;width:auto!important;height:auto!important;background:none!important;border:0!important;transform:none!important;
  font:500 10.5px/1 var(--rn-serif);letter-spacing:.24em;color:var(--rn-ink3);opacity:1!important}
html[data-skin="petal"] #home .home-grid-title{margin:auto 0 0!important;padding-top:16px;font:500 21px/1.1 var(--rn-serif)!important;font-style:normal!important;color:var(--rn-ink)!important;letter-spacing:.01em}
html[data-skin="petal"] #home .rn-cn{margin-top:5px;font:400 12px/1.2 var(--rn-cn);letter-spacing:.14em;color:var(--rn-ink2)}
html[data-skin="petal"] #home .home-grid-sub{margin-top:7px!important;font:italic 400 12.5px/1.25 var(--rn-serif)!important;color:var(--rn-ink3)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-skin="petal"] #home .rn-arrow{position:absolute;top:12px;right:14px;font:300 17px/1 var(--rn-serif);color:var(--rn-ink3)}
html[data-skin="petal"] #home .home-grid-card:active{transform:scale(.975);background:linear-gradient(160deg,rgba(255,255,255,.16),rgba(255,255,255,.05) 60%),rgba(16,16,16,.3)!important}
html[data-skin="petal"] #home .home-grid-card[data-page="hush"].hs-pending .home-grid-title::after{background:var(--rn-rose);box-shadow:0 0 0 3px rgba(216,154,181,.18)}
html[data-skin="petal"] #home .home-grid-card.rn-settings{grid-column:1/-1;min-height:0;flex-direction:row;align-items:baseline;gap:12px;margin-top:22px;padding:15px 18px!important;border-radius:18px!important;background:rgba(255,255,255,.04)!important}
html[data-skin="petal"] #home .home-grid-card.rn-settings::before{content:none!important}
html[data-skin="petal"] #home .home-grid-card.rn-settings .home-grid-title{margin:0!important;padding:0;font-size:18px!important;font-style:italic!important}
html[data-skin="petal"] #home .home-grid-card.rn-settings .rn-cn{margin:0}
html[data-skin="petal"] #home .home-grid-card.rn-settings .home-grid-sub{margin:0 0 0 auto!important;padding-right:22px}
html[data-skin="petal"] #home .home-grid-card.rn-settings .rn-arrow{top:50%;transform:translateY(-50%)}
html[data-skin="petal"] #home .home-footer{margin-top:34px;padding:0;font:400 12px/1 var(--rn-cn)!important;color:var(--rn-ink3)!important;letter-spacing:.32em}
html[data-skin="petal"] #home .home-footer::before{content:"toujours" !important;display:block;margin-bottom:10px;font:400 30px/1 var(--rn-script);letter-spacing:0;color:var(--rn-ink2)}
html[data-skin="petal"] #home .home-footer::after{content:none!important}
html[data-skin="petal"] #home .rn-cn{display:none!important}
html[data-skin="petal"] #home .home-grid{display:block!important}
html[data-skin="petal"] #home .rn-group{margin:28px 4px 10px!important;padding-bottom:0!important;border-bottom:0!important}
html[data-skin="petal"] #home .rn-list{display:block!important;padding:2px 18px!important;border-radius:22px;
  background:var(--rn-glass);border:1px solid var(--rn-edge);box-shadow:0 18px 40px -24px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:var(--rn-blur);-webkit-backdrop-filter:var(--rn-blur)}
html[data-skin="petal"] #home .rn-list .home-grid-card{display:grid!important;grid-template-columns:34px 1fr auto;grid-template-rows:auto auto;align-items:center;column-gap:6px;
  min-height:0!important;padding:15px 2px 14px!important;border-radius:0!important;background:none!important;border:0!important;box-shadow:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible}
html[data-skin="petal"] #home .rn-list .home-grid-card+.home-grid-card{border-top:1px solid var(--rn-line)!important}
html[data-skin="petal"] #home .rn-list .home-grid-card::before{grid-column:1;grid-row:1/3;align-self:center;font:italic 400 15px/1 var(--rn-serif)!important;letter-spacing:.02em!important;color:var(--rn-ink4)!important}
html[data-skin="petal"] #home .rn-list .home-grid-title{grid-column:2;grid-row:1;margin:0!important;padding:0!important;font:500 21px/1.15 var(--rn-serif)!important;letter-spacing:.015em}
html[data-skin="petal"] #home .rn-list .home-grid-sub{grid-column:2;grid-row:2;margin:3px 0 0!important;font-size:13.5px!important;color:var(--rn-ink3)!important}
html[data-skin="petal"] #home .rn-list .rn-arrow{position:static!important;grid-column:3;grid-row:1/3;align-self:center;font-size:16px;transition:transform .2s ease,color .2s ease}
html[data-skin="petal"] #home .rn-list .home-grid-card:active{transform:none;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.06),rgba(255,255,255,0))!important}
html[data-skin="petal"] #home .rn-list .home-grid-card:active .rn-arrow{transform:translate(2px,-2px);color:var(--rn-rose)}
html[data-skin="petal"] #home .home-grid-card.rn-settings{display:grid!important;grid-template-columns:1fr auto auto;align-items:baseline;column-gap:12px;margin-top:28px!important;padding:14px 20px!important;border-radius:999px!important}
html[data-skin="petal"] #home .home-grid-card.rn-settings .home-grid-sub{margin:0!important;padding:0!important}
html[data-skin="petal"] #home .home-grid-card.rn-settings .rn-arrow{position:static!important;transform:none!important}
html[data-skin="petal"] #home,html[data-skin="petal"] #home .home-inner{overflow-x:hidden!important;overscroll-behavior-x:none;touch-action:pan-y}
html[data-skin="petal"] #home .rn-hello{color:#f4f4f5;text-shadow:0 2px 20px rgba(255,255,255,.08)}
html[data-skin="petal"] #home .home-days{color:#EDEDEF!important;text-shadow:0 4px 26px rgba(255,255,255,.12)!important}
html[data-skin="petal"] #home .home-mile b{color:#fff}
html[data-skin="petal"] #home .home-panel:nth-child(2){border-left-color:rgba(255,255,255,.35)!important}
html[data-skin="petal"] #home .home-chat-card .home-card-icon svg{stroke:#f2f2f2}
html[data-skin="petal"] #home .rn-arrow{display:none!important}   /* 箭头她说不要 */
html[data-skin="petal"] #home .home-grid-card[data-page="hush"].hs-pending .home-grid-title::after{background:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.18)}
html[data-skin="petal"] #home .home-grid-card[data-page="hush"].hs-pending .home-grid-title::after{background:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.18)}
html[data-skin="petal"] .petal-home-heading,html[data-skin="petal"] .petal-mile {display:none!important}
html[data-skin="petal"] #home .rn-hello {font-size:clamp(26px,8vw,34px)!important;margin-top:14px!important}
html[data-skin="petal"] #home .rn-hello {color:var(--petal-accent)!important;text-shadow:none!important}
html[data-skin="petal"] #home .home-mile b {color:var(--petal-accent)!important}
html[data-skin="petal"] #home :is(#homeDays,.home-days) {color:var(--petal-ink)!important;-webkit-text-fill-color:var(--petal-ink)!important;background:none!important;text-shadow:none!important}
html[data-skin="petal"] #home .home-panel:has(#homeDays) {background:transparent!important;border:0!important;border-left:1px solid var(--petal-edge)!important;border-radius:0!important;box-shadow:none!important}
html[data-skin="petal"] #home .home-panel:has(#homeQuote) {background:transparent!important;border:0!important;box-shadow:none!important}
/* 10.30 她要「say something」往下一点；想法右边的角标钉在右边不转。 */
html[data-skin="petal"] #chat .composer-input-row {padding-top:8px}
/* THOUGHT_CHEV_V3（10.30 她说要跟黑纱一样）：小三角跟在 Thought 字后面，展开收起都不动不转 */
html[data-skin="petal"] #streamInner .ai-bubble > .thinking-summary .thinking-summary-text {flex:0 1 auto!important}
html[data-skin="petal"] #streamInner .thinking-summary .thinking-chevron {margin-left:4px!important;flex:none}
/* 10.30 首页紫了 —— 搬过来的黑纱规则拿聊天壁纸铺首页；花瓣只用自己的底色。
   底栏已经有 Chat / Trace / Memory / Setting，首页里就不再放这四个。 */
html[data-skin="petal"][data-skin] body #home {background:radial-gradient(110% 38% at 85% 0%,color-mix(in srgb,var(--petal-pink) 32%,transparent),transparent 70%),var(--petal-bg)!important;background-color:var(--petal-bg)!important}
html[data-skin="petal"] #home :is(.home-chat-card,.home-grid-card.rn-settings,.home-grid-card[data-page="trace"],.home-grid-card[data-page="memory"],.home-grid-card[data-page="settings"],.home-grid-card[data-page="chat"]) {display:none!important}
html[data-skin="petal"] #home .rn-list:not(:has(> .home-grid-card:not([data-page="trace"],[data-page="memory"],[data-page="settings"],[data-page="chat"]))) {display:none!important}

/* MOM_BAR_V2 · petal（10.30 她说）：发动态那条底下的奶油色挡板撤掉 —— 不铺底，只浮一条透的花瓣玻璃；白框换成粉纸色 */
html[data-skin="petal"] #momentsPanel .moments-bottom {background:none!important;pointer-events:none;padding:6px 16px calc(env(safe-area-inset-bottom) + 10px)!important}
html[data-skin="petal"] #momentsPanel .moments-bottom-inner {pointer-events:auto;max-width:330px;margin:0 auto;gap:10px;padding:6px 6px 6px 7px;
  background:rgba(250,232,238,.78)!important;backdrop-filter:blur(16px) saturate(1.4)!important;-webkit-backdrop-filter:blur(16px) saturate(1.4)!important;
  border:1px solid rgba(216,154,181,.28)!important;box-shadow:0 10px 26px -14px rgba(216,154,181,.7)!important}
html[data-skin="petal"][data-petal-tone="dark"] #momentsPanel .moments-bottom-inner {background:rgba(60,46,52,.72)!important;border-color:rgba(219,113,145,.25)!important}
html[data-skin="petal"] #momentsPanel .moments-bottom-cam {width:36px;height:36px;border:0!important;border-radius:50%;background:rgba(216,154,181,.16)!important;color:var(--petal-accent)!important}
html[data-skin="petal"] #momentsPanel .moments-bottom-text {color:var(--petal-muted)!important}
html[data-skin="petal"] #momentsPanel .mg-heart {background:var(--petal-accent)!important}
/* SEL_ROSE_V1 · petal：选择复制那块跟花瓣的粉走，划中的字有一层粉底 */
html[data-skin="petal"] .selcopy-card {background:var(--petal-bg)!important;color:var(--petal-ink)!important}
html[data-skin="petal"] .selcopy-text {caret-color:var(--petal-accent)}
html[data-skin="petal"] .selcopy-text::selection,html[data-skin="petal"] .selcopy-text ::selection {background:color-mix(in srgb,var(--petal-accent) 34%,transparent)}
html[data-skin="petal"] .selcopy-actions button {border-color:color-mix(in srgb,var(--petal-accent) 40%,transparent)!important;color:var(--petal-accent)!important;background:transparent!important}
html[data-skin="petal"] .selcopy-actions button.primary {background:var(--petal-accent)!important;color:#fff!important;border-color:transparent!important}
html[data-skin="petal"] .selcopy-x {background:color-mix(in srgb,var(--petal-accent) 12%,transparent)!important;color:var(--petal-accent)!important}
html[data-skin="petal"] #momentsPanel .moment-comment-input button {background:var(--petal-accent)!important;color:#fff!important}

/* ADD_SHEET_FIT_V1（10.30 她说）：加号那一屏底下一大片空 —— 不撑高，刚好装下那几行 */
html[data-skin="petal"] #petalAdd[open] {min-height:0!important;height:auto!important;padding-bottom:calc(14px + env(safe-area-inset-bottom))!important}
/* THOUGHT_CHEV_V5（10.30 她说的那个三角在这儿）：Thought / Used N tools 那一行原来铺满整宽、三角 margin-left:auto 推到最右，
   框框展开多宽它就跑到哪。照黑纱：行不铺满，三角贴在字后面，展开收起都在原地；展开朝下、收起朝右（10.30 她要的）。 */
html[data-skin="petal"] #streamInner :is(.timeline-head,.timeline-fold) {width:auto!important;max-width:100%;justify-content:flex-start!important}
html[data-skin="petal"] #streamInner .timeline-chevron {margin-left:4px!important}
/* PIC_SHEET_FIT_V1（10.30 她说）：Photos 点进去就三个选项，底下却撑到整屏高 —— 刚好装下那三行 */
html[data-skin="petal"] #picSheet {height:auto!important;min-height:0!important;max-height:85dvh}
html[data-skin="petal"] #picSheet .sheet-content {padding-bottom:calc(14px + env(safe-area-inset-bottom))!important}

/* BUB_WIDE_V1（10.30）：她说气泡左右长一点，原来 80% 一句话折得太早。 */
html[data-skin="petal"] #streamInner .msg-user .msg-body {max-width:88%}

/* PETAL_BUBBLE_V1（10.30）：花瓣也能换玻璃气泡 —— 同一个颜色，调淡了透出壁纸，一圈亮边。默认还是实心。 */
html[data-skin="petal"][data-pt-bubble="frost"] #streamInner .bubble {background:linear-gradient(170deg,rgba(255,255,255,.35),rgba(255,255,255,0) 70%),color-mix(in srgb,var(--bub-me,var(--petal-pink)) 52%,transparent)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.5),0 8px 20px -12px #493a3833!important;backdrop-filter:blur(16px) saturate(1.3)!important;-webkit-backdrop-filter:blur(16px) saturate(1.3)!important}
html[data-skin="petal"][data-pt-bubble="frost"] #streamInner .msg-claude .md {background:linear-gradient(170deg,rgba(255,255,255,.4),rgba(255,255,255,0) 65%),color-mix(in srgb,var(--bub-you,var(--petal-ai)) 58%,transparent)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),0 8px 22px -12px #493a3833!important;backdrop-filter:blur(16px) saturate(1.3)!important;-webkit-backdrop-filter:blur(16px) saturate(1.3)!important}
html[data-skin="petal"][data-pt-bubble="frost"][data-chat-bg="dark"] #streamInner :is(.bubble,.msg-claude .md) {box-shadow:inset 0 0 0 1px rgba(255,255,255,.14),0 8px 20px -12px rgba(0,0,0,.5)!important}
