/* Generated by scripts/build_public_assets.py; edit the source styles. */
/* static/styles/ui-theme.entry.css */
/* static/ui-paper.css */
/* Paper Adventure: generated raster faces, nine-sliced without changing layout.
   One source for the client, workbench, tools and hosted platform pages. */
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) {
  --paper-parchment:url('/static/media/ui/paper-adventure/card-parchment.webp');
  --paper-note:url('/static/media/ui/paper-adventure/card-note.webp');
  --paper-journal:url('/static/media/ui/paper-adventure/card-journal.webp');
  --paper-workbench:url('/static/media/ui/paper-adventure/card-workbench.webp');
  --paper-dialog:url('/static/media/ui/paper-adventure/card-dialog.webp');
  --paper-ticket:url('/static/media/ui/paper-adventure/card-ticket.webp');
  --paper-strip:url('/static/media/ui/paper-adventure/nav-strip.webp');
  --paper-sidebar:url('/static/media/ui/paper-adventure/nav-sidebar.webp');
  --paper-teal:url('/static/media/ui/paper-adventure/button-teal.webp');
  --paper-gold:url('/static/media/ui/paper-adventure/button-gold.webp');
  --paper-input:url('/static/media/ui/paper-adventure/input-inset.webp');
  /* Generated control faces: a teal bevel button, and a cream paper face for chips and fields. */
  --paper-btn-face:url('/static/media/ui/paper-adventure/button-tex.webp') 18 20 20 20 fill / 7px 8px 8px 8px / 0 stretch;
  --paper-btn-face-hover:url('/static/media/ui/paper-adventure/button-tex-hover.webp') 18 20 20 20 fill / 7px 8px 8px 8px / 0 stretch;
  --paper-chip-face:url('/static/media/ui/paper-adventure/input-tex.webp') 16 fill / 5px / 0 stretch;
  --paper-chip-face-hover:url('/static/media/ui/paper-adventure/input-tex-hover.webp') 16 fill / 5px / 0 stretch;
  --paper-field-face:url('/static/media/ui/paper-adventure/input-tex.webp') 16 fill / 6px / 0 stretch;
  --paper-field-face-focus:url('/static/media/ui/paper-adventure/input-tex-hover.webp') 16 fill / 6px / 0 stretch;
  /* Plain paper-grain fills are retired: surfaces are flat colour; only framed faces keep texture. */
  --paper-page:none;
  --paper-ivory:none;
  --paper-landscape:url('/static/media/ui/paper-adventure/store-landscape.png');
  --paper-creator:url('/static/media/ui/paper-adventure/creator-island.webp');
  --paper-library:url('/static/media/ui/paper-adventure/library-camp.webp');
  --paper-reward:url('/static/media/ui/paper-adventure/reward-trail.webp');
  --paper-empty:url('/static/media/ui/paper-adventure/empty-compass.webp');
  --paper-social:url('/static/media/ui/paper-adventure/social-postbox.webp');
  --paper-tools:url('/static/media/ui/paper-adventure/workbench-tools.webp');
  --paper-coins:url('/static/media/ui/paper-adventure/icon-coins.webp');
  --paper-clock:url('/static/media/ui/paper-adventure/icon-clock.webp');
  --paper-backpack:url('/static/media/ui/paper-adventure/icon-backpack.webp');
  --paper-heartbeat:url('/static/media/ui/paper-adventure/icon-heartbeat.webp');
  --paper-shield:url('/static/media/ui/paper-adventure/icon-shield.webp');
  --paper-trophy:url('/static/media/ui/paper-adventure/icon-trophy.webp');
  --paper-discovery:url('/static/media/ui/paper-adventure/discovery-ornament.webp');
  --paper-canopy:url('/static/media/ui/paper-adventure/library-canopy.webp');
  --paper-categories:url('/static/media/ui/paper-adventure/category-icons.webp');
  --paper-account-banner:url('/static/media/ui/paper-adventure/account-banner.webp');
  --paper-account-wallet:url('/static/media/ui/paper-adventure/account-wallet.webp');
  --paper-account-email:url('/static/media/ui/paper-adventure/account-email.webp');
  --paper-account-security:url('/static/media/ui/paper-adventure/account-security.webp');
  --paper-account-ledger:url('/static/media/ui/paper-adventure/account-ledger.webp');
  --paper-account-groups:url('/static/media/ui/paper-adventure/account-groups.webp');
  --paper-account-help:url('/static/media/ui/paper-adventure/account-help.webp');
  --paper-empty-playtime:url('/static/media/ui/paper-adventure/empty-playtime.webp');
  --paper-empty-inventory:url('/static/media/ui/paper-adventure/empty-inventory.webp');
  --paper-profile-pencil:url('/static/media/ui/paper-adventure/profile-pencil.webp');
  --paper-workbench-corner:url('/static/media/ui/paper-adventure/workbench-corner.webp');
  --paper-sidebar-forest:url('/static/media/ui/paper-adventure/sidebar-forest-rail.webp');
  --paper-sidebar-tab:url('/static/media/ui/paper-adventure/sidebar-tab-ivory.webp');
  --paper-sidebar-selected:url('/static/media/ui/paper-adventure/sidebar-tab-gold.webp');
  --paper-portal-frame:url('/static/media/ui/paper-adventure/creator-portal-frame.webp');
  --paper-robot:url('/static/media/ui/paper-adventure/creator-paper-robot.webp');
  --paper-toolbar-island:url('/static/media/ui/paper-adventure/toolbar-paper-island.webp');
  --paper-topbar:url('/static/media/ui/paper-adventure/top-bar-clean.webp');
  --paper-nav-gamepad:url('/static/media/ui/paper-adventure/sidebar-icon-gamepad.webp');
  --paper-nav-cube:url('/static/media/ui/paper-adventure/sidebar-icon-cube.webp');
  --paper-nav-star:url('/static/media/ui/paper-adventure/sidebar-icon-star.webp');
  --paper-nav-news:url('/static/media/ui/paper-adventure/sidebar-icon-newspaper.webp');
  --paper-nav-settings:url('/static/media/ui/paper-adventure/sidebar-icon-settings.webp');
  --paper-nav-arrow:url('/static/media/ui/paper-adventure/sidebar-icon-arrow.webp');
  --paper-nav-books:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg stroke='%230f3436' stroke-width='1.3' stroke-linejoin='round'%3E%3Crect x='3.5' y='8' width='6.5' height='19' rx='1' fill='%23205c5b'/%3E%3Crect x='10' y='4.5' width='6.5' height='22.5' rx='1' fill='%23e3a83b'/%3E%3Cpath d='M17.6 9.6l6-1.7 5.2 17.8-6 1.7z' fill='%23efe2c2'/%3E%3C/g%3E%3Cpath d='M5 12h3.5M5 23h3.5M11.5 9h3.5M11.5 23h3.5' stroke='%23f4ecd9' stroke-width='1.3'/%3E%3Cpath d='M19.6 13.4l3.6-1M22.4 23l3.6-1' stroke='%23205c5b' stroke-width='1.3'/%3E%3Cpath d='M2 27.6h28' stroke='%230f3436' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  --paper-ink:#173c3e; --paper-muted:#54665c;
}

/* Semantic owners only: scene canvases, user media and layout containers stay clear. */
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  [data-ui-surface=paper],.ui-panel,.ui-surface,.panel,.card,.ui-card,.game-card,
  .mini-feature,.rank-board,.intro-panel,.user-space-profile,.user-shell,
  .friends-shell,.friends-list,.friends-messages,.tweet-composer,.tweet,.social-post,
  .stat,.account-stat,.account-system-metric,.account-summary-panel,.account-ledger-panel,
  .system-metric,.summary-card,.settings-card,.inventory-card,.inventory-group,
  .playtime-card,.game-status-main,.game-status-stat,.progress-card,.lottery-card,
  .cf-project-card,.cf-workspace-card,.cf-workspace-panel,.cf-detail-panel,.cf-game-summary,
  .cf-proposal,.cf-comment,.cf-message-list,.cf-donate-box,.cf-workspace-board-card,
  .cf-workspace-task,.shop-card,.download-card,.profile-card,.mini-panel,.stage-card,
  .wb-settings-panel,.workbench-assistant,.wb-data-editor,.wb-asset-browser,.wb-runtime-log,
  .wb-conversations,.wb-assistant-activity,.wb-scene-properties,.wb-scene-sidebar,
  .wb-scene-asset-folders,.wb-scene-assets,.wb-data-preview,.wb-document-editor,
  .wb-appearance-card,.wb-selection-options,.wb-reference,.wb-composer-main,
  .agent-profiles,.agent-profiles-list,.pet-chat,.pet-chat-preview,.pet-chat-files,.assistant-care,.assistant-care-foods article,.assistant-care-history,
  .workbench-new-game,.workbench-window-menu,.workbench-window-help,.help-page,
  .wb-activity-runtime,.data-preview,.wb-publication-pending,.wb-embedded-notice,
  .feika-pet-bubble,.feika-pet-notice,.feika-selection-note-editor,.bug-report-panel
) {
  --paper-face:var(--paper-parchment);
  background:transparent!important; color:var(--paper-ink);
  border-color:transparent!important; border-radius:3px!important;
  border-image:var(--paper-face) 10% fill / 12px / 0 stretch!important;
  box-shadow:none!important;
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .card,.ui-card,.game-card,.mini-feature,.stat,.account-stat,.account-system-metric,.system-metric,
  .summary-card,.settings-card,.inventory-card,.playtime-card,.progress-card,.lottery-card,.shop-card,
  .download-card,.profile-card,.stage-card,.account-summary-panel,.account-ledger-panel,.library-card,
  .ui-feature,.gazette-card,.gazette-issue,.tweet,.social-post,.cf-project-card,.wb-appearance-card
) { filter:drop-shadow(0 2px 2px #102f3229) drop-shadow(0 5px 7px #102f321a); }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .card,.ui-card,.game-card,.inventory-card,.account-system-metric,.system-metric,
  .stat,.account-stat,.summary-card,.wb-appearance-card,.wb-reference
) { --paper-face:var(--paper-note); }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .tweet,.social-post,.tweet-composer,.friends-list,.pet-chat,.wb-conversations,
  .wb-runtime-log,.wb-assistant-activity,.cf-comment,.cf-message-list,.help-page
) { --paper-face:var(--paper-journal); }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .dev-workspace,.publication-editor,.wb-data-editor,.wb-asset-browser,.wb-scene-properties,
  .wb-scene-assets,.wb-document-editor,.wb-data-preview,.wb-settings-panel
) { --paper-face:var(--paper-workbench); }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .reward-stage,.reward-stage-list,.stage-card,.result-card,.reward-box,.inventory-group,
  .lottery-result,.lottery-prize,.cf-quota-item,.readiness-item
) {
  background:transparent!important; border-color:transparent!important;
  border-image:var(--paper-ticket) 18% 3% 20% 3% fill / 10px / 0 stretch!important;
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .modal-card,.modal-dialog,.modal-panel,.config-modal,.dialog,.workbench-dialog,
  .wb-rules-dialog,.wb-scene-asset-picker,.voxel-authoring-dialog,.admin-review-dialog,
  .wb-project-menu-popup,.wb-settings-popover,.client-friends-panel,.client-edge-menu,
  .channel-menu,.channel-dropdown,.drawer,.ui-toast,.toast-item,[role=dialog]:not(.modal)
) {
  background:transparent!important; color:var(--paper-ink);
  border-color:transparent!important; border-radius:3px!important;
  border-image:var(--paper-dialog) 11% 4% 13% 4% fill / 14px / 0 stretch!important;
  box-shadow:none!important; filter:drop-shadow(0 8px 14px #102f3238);
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .panel-head,.panel-header,.ui-dialog-header,.ui-footer,.social-sticky-head,.timeline-head,
  .filter-bar,.section-banner,.friends-toolbar,.store-filters,.dev-workspace-head,
  .game-detail-tabs,.cf-project-appbar,.cf-toolbar,.cf-forum-nav,.cf-game-nav,
  .client-tool-island,.client-toolbar-hint,.workbench-windowbar,
  .dv-tabs-and-actions-container,.wb-scene-toolbar,.wb-data-heading,.dialog-toolbar,
  .workbench-dialog>header,.workbench-dialog>footer,.wb-panel-head,.agent-profiles-toolbar,
  .pet-chat-heading,.pet-conversation-nav,.data-preview-toolbar,.wb-media-controls
) {
  background:transparent!important; color:var(--paper-ink);
  border-color:transparent!important;
  border-image:var(--paper-strip) 33% 3% 32% 3% fill / 5px 8px / 3px 2px stretch!important;
}
:root[data-platform-theme=paper-adventure] {
  --bg:#f4ecd9; --bg-2:#ede1c8; --surface:#faf2df; --panel:#faf2df; --panel-solid:#faf2df;
  --panel-2:#efe6d1; --soft:#eee3cb; --text:#173c3e; --muted:#54665c; --dim:#6e7465;
  --ink-1:#173c3e; --ink-2:#435c53; --ink-3:#54665c; --ink-4:#6e7465;
  --brand:#205c5b; --brand-dark:#174947; --brand-hover:#286c65; --brand-soft:#d9e4ce;
  --on-brand:#fff8e5; --line:#c8bfa3; --line-strong:#938c70; --line-soft:#ded2b7;
  --hover-bg:#e5e8d3; --green:#326346; --ok:#326346; --warn:#845919; --danger:#a03f30;
  --radius-control:3px; --radius-card:3px; --radius-dialog:3px; --teal:#205c5b;
  /* Torn paper carries its own drop-shadow; rectangular box shadows stay off. */
  --shadow-card:none; --shadow-hover:none; --shadow-dialog:none; --collection-shadow:none; --collection-hover-shadow:none;
}
:root[data-platform-theme=paper-adventure] body.feika-ui {
  background:#174e50 var(--paper-page) repeat!important; background-size:720px!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui::before { background:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform .shell>main {
  background:#f4ecd9 var(--paper-ivory) repeat!important; background-size:720px!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #platformNavigation,
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.sidebar,.side-nav,.dev-sidebar) {
  background:transparent!important; border-color:transparent!important;
  border-image:var(--paper-sidebar) 10% fill / 12px / 0 stretch!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui .topbar-inner { background:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform>.shell>.topbar {
  background:transparent!important; border-image:var(--paper-sidebar) 10% fill / 12px / 0 stretch!important;
}
/* Platform controls are cream paper chips; primary actions and selections take the teal bevel. */
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.ui-control,button,a.button,.btn-download):not(:is(.feika-pet,.ui-card-open,.ui-card-action,.text,.link)) {
  background-image:none; color:var(--paper-ink); background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.ui-control,button,a.button,.btn-download):not(:is(.feika-pet,.ui-card-open,.ui-card-action,.text,.link)):hover:not(:disabled) {
  border-image:var(--paper-chip-face-hover)!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.ui-control,button):is(.text,.link) {
  background:transparent!important; border-color:transparent!important; border-image:none!important; box-shadow:none!important;
}
/* #storeSort only lifts the selector above the shared field face. */
:root[data-platform-theme=paper-adventure] body.feika-ui :is(select.ui-control,#storeSort) {
  padding-right:34px!important; appearance:none; color:var(--paper-ink)!important;
  /* No fill: the frame's middle would cover the chevron, so the cream sits in the background instead. */
  border:0!important; border-radius:0!important; border-image:url('/static/media/ui/paper-adventure/input-tex.webp') 16 / 5px / 0 stretch!important; box-shadow:none!important;
  background:#f3f0e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23173c3e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center/14px no-repeat!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(
  button.primary,.ui-control.primary,a.button,.btn-download,.library-primary-action,#featuredOpenBtn,
  #primaryGameActionBtn,#saveDevItemBtn,#publishGameBtn,[data-ui-control=navigation][aria-current=page],
  .dev-tab.active,.rank-tab.active
):not(:disabled):not([aria-disabled=true]) {
  color:#fff8e5!important; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(
  button.primary,.ui-control.primary,a.button,.btn-download,.library-primary-action,#featuredOpenBtn,
  #primaryGameActionBtn,#saveDevItemBtn,#publishGameBtn,.dev-tab.active,.rank-tab.active
):not(:disabled):not([aria-disabled=true]):hover { border-image:var(--paper-btn-face-hover)!important; }
:root[data-workbench-theme=paper-adventure] :is(
  button.primary,.primary,a.button,.btn-download,.wb-tool-primary,.pc-primary,.wb-send,
  .workbench-play,.pet-chat-send,.library-primary-action,#featuredOpenBtn,#primaryGameActionBtn,
  #saveDevItemBtn,#publishGameBtn,[data-ui-control=navigation][aria-current=page],
  .client-platform-tab[aria-pressed=true],.ui-nav.active,.dev-tab.active,.rank-tab.active
):not(:disabled):not([aria-disabled=true]) {
  color:#fff8e5!important; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
:root[data-workbench-theme=paper-adventure] :is(
  button.primary,.primary,a.button,.btn-download,.wb-tool-primary,.pc-primary,.wb-send,
  .workbench-play,.pet-chat-send,.library-primary-action,#featuredOpenBtn,#primaryGameActionBtn,
  #saveDevItemBtn,#publishGameBtn,.client-platform-tab[aria-pressed=true],.dev-tab.active,.rank-tab.active
):not(:disabled):not([aria-disabled=true]):hover { border-image:var(--paper-btn-face-hover)!important; }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
  textarea,select,.readonly-field,.wb-rule-editor,.ui-log,.wb-runtime-log-list>pre
) {
  background:transparent!important; color:var(--paper-ink)!important;
  border-color:transparent!important; border-radius:0!important;
  border-image:var(--paper-field-face)!important; box-shadow:none!important;
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select
):is(:focus,:focus-visible):not(:disabled) { border-image:var(--paper-field-face-focus)!important; outline:none!important; }
/* Dropdowns: an unfilled frame over a cream background, so the chevron shows through. */
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) select:not([multiple]):not([size]) {
  appearance:none; padding-right:32px!important;
  border-image:url('/static/media/ui/paper-adventure/input-tex.webp') 16 / 6px / 0 stretch!important;
  background:#f3f0e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23173c3e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 11px center/14px no-repeat!important;
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) select:not([multiple]):not([size]):focus:not(:disabled) { border-image:url('/static/media/ui/paper-adventure/input-tex-hover.webp') 16 / 6px / 0 stretch!important; }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(button,a,[role=tab],summary):focus-visible {
  outline:2px solid #ad762a!important; outline-offset:2px!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #platformNavigation .home-creator-card {
  background:#dce3c9!important; border-image:var(--paper-journal) 10% fill / 10px / 0 stretch!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #platformNavigation .home-creator-card::before {
  background:var(--paper-creator) right bottom / contain no-repeat!important; opacity:.6;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #platformNavigation .home-creator-card::after { background:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #platformNavigation .home-creator-card :is(h2,p) { color:var(--paper-ink)!important; position:relative; }
:root[data-platform-theme=paper-adventure] body.feika-ui #platformNavigation #homeCreateBtn {
  border-image:var(--paper-gold) 12% 1.5% 17% 1.5% fill / 6px / 2px 0 stretch!important; color:var(--paper-ink)!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #libraryView::before {
  background:var(--paper-library) right top / contain no-repeat!important; opacity:.8;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.account-hero,.account-header) {
  background:var(--paper-landscape) right center / cover no-repeat!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.ui-card-placeholder,.empty-state-visual,.lottery-empty-visual) {
  background:var(--paper-empty) center / contain no-repeat!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.play-progress-panel,.progress-card):not(:has(input)) {
  background:var(--paper-reward) right bottom / min(600px,100%) auto no-repeat,var(--paper-ivory)!important;
}
:root[data-platform-theme=paper-adventure] .account-system-icon {
  width:46px!important; height:46px!important; background:center/contain no-repeat!important;
}
:root[data-platform-theme=paper-adventure] .account-system-icon svg { visibility:hidden; }
:root[data-platform-theme=paper-adventure] .account-system-metric:has(#gameCoins) .account-system-icon { background-image:var(--paper-coins)!important; }
:root[data-platform-theme=paper-adventure] .account-system-metric:has(#gameInventoryCount) .account-system-icon { background-image:var(--paper-backpack)!important; }
:root[data-platform-theme=paper-adventure] .account-system-metric:has(#playtimeTotal) .account-system-icon { background-image:var(--paper-clock)!important; }
:root[data-platform-theme=paper-adventure] .account-system-metric:has(#productionTimeTotal) .account-system-icon { background-image:var(--paper-tools)!important; }
@media(max-width:760px) {
  :root[data-platform-theme=paper-adventure] body.feika-ui .topbar { border-image:var(--paper-strip) 33% 3% 32% 3% fill / 5px 8px / 3px 2px stretch!important; }
  :root[data-platform-theme=paper-adventure] body.feika-ui .account-system-icon { width:32px!important; height:32px!important; }
}

/* Secondary pages use the same semantic families, rather than another universal tile. */
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .login-card,.auth-panel,.account-card,.intro-card,.user-home-head,.buy-box,
  .catalog-card,.package-picker-item,.dev-item-row,.dev-tags-field,.upload-drop,
  .payment-lock,.recharge-summary,.lottery-pool-hero,.lottery-prize-panel,.lottery-main,
  .lottery-side,.cf-game-stats,.cf-state-doc,.cf-md-upload,.cf-notice,.metrics>div,
  .notice,.admin-box,.trend-card,.cxd-Panel,.publication-store-preview,.summary,
  .password-setup,.feedback,.log-list,.game-ui-error,.workbench-error,
  .assistant-care-stage,.blockout-form,.data-preview-status,.pc-browser.wb-tool-surface,
  .pc-browser .pc-details,.workbench-component-help>div,.wb-help>div
) {
  background:transparent!important; color:var(--paper-ink); border-color:transparent!important;
  border-image:var(--paper-note) 10% fill / 10px / 0 stretch!important;
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .tweet-item,.tweet-detail,.discussion-composer,.announcement,.social-feed-panel,
  .ui-message-bubble,.cf-message-row,.pet-chat-history,.pet-chat-attachments,.pet-chat-working
) {
  background:transparent!important; border-color:transparent!important;
  border-image:var(--paper-journal) 10% fill / 9px / 0 stretch!important;
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .content-language-tabs,.catalog-filter-tabs,.cf-proposal-footer,.publication-preview-heading,
  .modal-card>header,.modal-card>footer,.modal-dialog>header,.mobile-drawer-head,
  .agent-profiles-footer,.dialog-actions,.ugc-scene-controls,
  .voxel-test-actions,.pet-chat-footer,.selection-heading
) {
  background:transparent!important; border-color:transparent!important;
  border-image:var(--paper-strip) 33% 3% 32% 3% fill / 5px 8px / 3px 2px stretch!important;
}
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .upload-overlay-card,.workbench-window-help,.workbench-window-menu
) { background:transparent!important; border-image:var(--paper-dialog) 10% fill / 12px / 0 stretch!important; }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .upload-overlay-bar>div,.reward-progress-fill,.cf-progress>span,.ui-progress>div
) { background:#c18b32 var(--paper-gold) center/100% 100%!important; }
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(
  .inventory-tab.active,.amount-option.active,.scope button.active,.gp-lang-btn.active,
  .cf-tab.active,.library-filter-button.active,.content-language-tab.active,
  .dev-item-row.is-editing,.sub2api-group-option.is-selected,.dev-item-check:has(input:checked)
) { background:transparent!important; border-image:var(--paper-journal) 12% fill / 6px / 0 stretch!important; }
:root[data-workbench-theme=paper-adventure] :is(
  body.feika-environment-document,body.feika-help-document,body.feika-content-document,
  body.feika-assistant-document
), :root[data-workbench-theme=paper-adventure].wb-component-document body {
  background:#faf2df var(--paper-ivory) repeat!important; background-size:720px!important;
}
:root[data-workbench-theme=paper-adventure] body.feika-content-document :is(.filters,.card,aside,dialog,.previews) {
  background:transparent!important; border-image:var(--paper-workbench) 10% fill / 8px / 0 stretch!important;
}
:root[data-platform-theme=paper-adventure] .platform-theme-swatch.paper-adventure {
  background:var(--paper-landscape) center/cover; border-color:#c8bfa3;
}
:root[data-platform-theme=paper-adventure] :is(.friends-empty,.friends-message-empty)::before {
  content:""; display:block; width:120px; height:100px; margin:0 auto 12px;
  background:var(--paper-social) center/contain no-repeat; pointer-events:none;
}
:root[data-platform-theme=paper-adventure] .rank-board .panel-head::after {
  content:""; width:36px; height:36px; flex:none; background:var(--paper-trophy) center/contain no-repeat; pointer-events:none;
}
:root[data-platform-theme=paper-adventure] :is(.account-section-title,.ui-heading-row):has([data-i18n=securitySettings])::before {
  content:""; width:32px; height:32px; flex:none; background:var(--paper-shield) center/contain no-repeat; pointer-events:none;
}
:root[data-platform-theme=paper-adventure] .ui-card:has(#timeRewardText) .ui-card-title::before {
  content:""; display:inline-block; width:28px; height:28px; vertical-align:middle; margin-right:8px;
  background:var(--paper-heartbeat) center/contain no-repeat; pointer-events:none;
}

html:root[data-platform-theme=paper-adventure] body.feika-ui :is(
  button.primary,.ui-control.primary,.ui-nav.active,[data-ui-control=navigation][aria-current=page],
  .rank-tab.active,#homeCreateBtn
):not(:disabled):not([aria-disabled=true]) { color:#fff8e5!important; --control-metadata-ink:#fff8e5; }
html:root[data-platform-theme=paper-adventure] body.feika-ui #homeCreateBtn { color:#173c3e!important; }
html:root[data-platform-theme=paper-adventure] {
  --nav-active:#205c5b; --nav-on-active:#fff8e5; --button-primary:#205c5b;
  --control-accent:#205c5b; --control-on-accent:#fff8e5;
  --app-chrome:#f4ecd9; --glass-toolbar:#faf2df;
}
:root[data-platform-theme=paper-adventure] body.feika-ui .ui-feature {
  border-color:transparent!important;
  border-image:var(--paper-parchment) 10% / 8px / 0 stretch!important;
}
/* Library: each game is a paper photo card; the cover sits inside the note and
   the caption is printed on the paper below it. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card {
  position:relative; display:flex; flex-direction:column; gap:9px; padding:14px 14px 14px;
  border:0!important; border-radius:2px!important; background:transparent!important; box-shadow:none!important;
  /* Slices are image pixels: the 150x120 top-right piece holds the whole curl at a fixed size. */
  border-image:var(--paper-note) 150 120 80 60 fill / 45px 36px 24px 18px / 20px 5px 11px 12px stretch!important;
  transition:translate .18s ease,filter .18s ease;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card:hover:not(.is-launch-locked) { translate:0 -3px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card::before,
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card-content::before { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card-art {
  position:relative; inset:auto; z-index:0; flex:1 1 auto; min-height:0;
  border-radius:4px; overflow:hidden; background:#ddd2b6; box-shadow:inset 0 0 0 1px #5b4a2e33;
  clip-path:polygon(0 0,calc(100% - 22px) 0,100% 14px,100% 100%,0 100%);
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card .cover { aspect-ratio:auto; height:100%; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card-content { display:block; position:static; margin-top:0; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-game-copy { min-width:0; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-game-copy h3 {
  display:block; height:auto; white-space:nowrap; text-overflow:ellipsis; color:var(--paper-ink); text-shadow:none;
  font:700 15px/1.3 Georgia,"Times New Roman","Microsoft YaHei UI",serif;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card-featured .library-game-copy h3 { font-size:clamp(19px,1.7vw,26px); }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-status { align-items:center; min-height:0; margin-top:2px; color:var(--paper-muted); white-space:nowrap; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-status-label { display:block; overflow:hidden; text-overflow:ellipsis; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-status::before { margin-bottom:0; }
/* Actions sit on the caption row, right of the title: a round teal play button and a quiet menu dot. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card-content { position:relative; padding-right:48px; min-height:38px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card-content:has(.ui-action-menu>.ui-menu-actions>.ui-control:not(.hide)) { padding-right:84px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-actions {
  position:absolute; top:50%; right:0; translate:0 -50%; z-index:2; display:flex; align-items:center; gap:6px; min-height:0;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryList .library-actions>button.library-primary-action {
  width:46px; height:38px; min-height:0; padding:0; display:grid; place-items:center;
  color:#fff8e5!important; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important; filter:drop-shadow(0 2px 3px #0f2e3033);
  transition:background-color .15s ease,scale .15s ease;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryList .library-actions>button.library-primary-action svg { width:17px; height:17px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryList .library-actions>button.library-primary-action:hover:not(:disabled) { border-image:var(--paper-btn-face-hover)!important; scale:1.06; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryList .library-actions>button.library-primary-action:disabled {
  color:var(--paper-muted)!important; border-image:var(--paper-chip-face)!important; filter:none;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryList .library-actions .ui-action-menu>summary {
  width:30px; min-width:0; height:30px; min-height:0; padding:0; display:grid; place-items:center; color:var(--paper-ink)!important;
  font-size:16px; line-height:1; background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important; filter:none;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryList .library-actions .ui-action-menu>summary:hover { border-image:var(--paper-chip-face-hover)!important; }
/* Filters are separate rounded chips; the chosen filter is filled teal. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-filter-group {
  gap:8px; padding:0; background:transparent!important; border:0!important; border-image:none!important; box-shadow:none!important; filter:none;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryFilters .library-filter-button {
  min-height:36px; padding:0 14px!important; gap:8px; color:var(--paper-ink)!important; font:500 14px/1 "Segoe UI","Microsoft YaHei UI",sans-serif;
  background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryFilters .library-filter-button:hover:not(.active) { border-image:var(--paper-chip-face-hover)!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryFilters .library-filter-button::after { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryFilters .library-filter-button.active {
  color:#fff8e5!important; font-weight:600; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryFilters .library-filter-button span[id] { height:auto; min-width:0; padding:0; background:none; font-size:12px; opacity:.7; }
/* Sort is the same rounded chip as the other controls. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-head-actions { gap:8px; color:var(--paper-muted); }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-sort>summary {
  min-height:36px; padding:0 12px 0 14px!important; gap:10px; color:var(--paper-ink)!important; font:500 14px/1 "Segoe UI","Microsoft YaHei UI",sans-serif;
  background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #librarySort>summary>span[aria-hidden] {
  width:14px; height:14px; font-size:0; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23173c3e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-sort-options { padding:8px; border:0; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-sort-option { min-height:36px; border-image:none!important; background:transparent!important; color:var(--paper-ink)!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-sort-option:hover { background:#205c5b14!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-sort-option[aria-pressed=true] { color:#205c5b!important; font-weight:700; background:#205c5b1f!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #libraryView::before {
  background-image:var(--paper-canopy)!important; opacity:.9!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #userView .user-space-profile::before {
  background-image:var(--paper-creator)!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #categoryTabs .rank-tab::before {
  background-image:var(--paper-categories)!important; background-size:600% 100%!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #accountIdentityCard {
  background:transparent!important; border-image:var(--paper-account-banner) 12% fill / 12px / 0 stretch!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #accountIdentityCard::before,
:root[data-platform-theme=paper-adventure] body.feika-ui #accountIdentityCard::after { background:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui .account-stat-icon { background:center/contain no-repeat!important; width:40px; height:40px; }
:root[data-platform-theme=paper-adventure] body.feika-ui .account-stat-icon svg { visibility:hidden; }
:root[data-platform-theme=paper-adventure] body.feika-ui .account-stat:nth-child(1) .account-stat-icon { background-image:var(--paper-account-wallet)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui .account-stat:nth-child(2) .account-stat-icon { background-image:var(--paper-account-ledger)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui .account-stat:nth-child(3) .account-stat-icon { background-image:var(--paper-account-security)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui :is(#walletLedger,#walletLedgerFull,#inventoryDetailGroups,#playtimeView) .ui-state[data-ui-state=empty]::before {
  content:""; display:block; flex:none; width:100px; height:84px; margin:0 auto 8px;
  background:var(--paper-account-ledger) center/contain no-repeat; pointer-events:none;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #inventoryDetailGroups .ui-state[data-ui-state=empty]::before { background-image:var(--paper-empty-inventory); }
:root[data-platform-theme=paper-adventure] body.feika-ui #playtimeView .ui-state[data-ui-state=empty]::before { background-image:var(--paper-empty-playtime); }
:root[data-platform-theme=paper-adventure] body.feika-ui #profileModal {
  border-image:var(--paper-dialog) 10% fill / 12px / 0 stretch!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #profileModal .ui-dialog-header { background:var(--paper-profile-pencil) right 56px center/60px auto no-repeat!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui .help-card { background:var(--paper-account-help) right 12px center/64px auto no-repeat!important; padding-right:82px; }
:root[data-platform-theme=paper-adventure] body.feika-ui #sub2apiView>.ui-flow>.ui-heading-row { background:var(--paper-account-groups) right center/64px auto no-repeat; }
:root[data-platform-theme=paper-adventure] body.feika-ui :is(.auth-panel,.login-card) { background:var(--paper-account-email) right top/90px auto no-repeat!important; }
:root[data-workbench-theme=paper-adventure] :is(.workbench-window-help,.wb-help)>div:empty,
:root[data-workbench-theme=paper-adventure] .wb-embedded-notice {
  background:var(--paper-workbench-corner) right bottom/100px auto no-repeat!important;
}
:root[data-workbench-theme=paper-adventure] :is(.workbench-main>.workbench-assistant,.wb-settings-panel) { border-image-source:var(--paper-workbench)!important; }

/* Decorative overlays paint above a nine-sliced card's filled center. */
:root[data-platform-theme=paper-adventure] body.feika-ui #accountIdentityCard { border-image-source:var(--paper-parchment)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #accountIdentityCard::before {
  content:""; inset:0 0 0 auto; width:48%; z-index:0;
  background:var(--paper-account-banner) right center/auto 100% no-repeat!important; opacity:.75;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #accountIdentityCard .account-profile-body { position:relative; z-index:1; }
:root[data-platform-theme=paper-adventure] body.feika-ui .side-nav { border-image-source:var(--paper-strip)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui:has(#gameSystemView:not(.hidden)) .brand { display:none; }
:root[data-platform-theme=paper-adventure] body.feika-ui #storeCatalogSection::after {
  content:""; display:block; height:72px; margin-top:20px;
  background:var(--paper-discovery) right bottom/auto 100% no-repeat; pointer-events:none;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #stageRewardBlock { position:relative; isolation:isolate; }
:root[data-platform-theme=paper-adventure] body.feika-ui #stageRewardBlock::after {
  content:""; position:absolute; z-index:0; bottom:5px; right:8px; width:130px; height:65px;
  background:var(--paper-reward) right bottom/contain no-repeat; opacity:.3; pointer-events:none;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #stageRewardBlock>.ui-card-body { position:relative; z-index:1; }
:root[data-platform-theme=paper-adventure] body.feika-ui .ui-card:has(#timeRewardText) .ui-card-title>svg { display:none; }
:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account .app-shell {
  min-height:100dvh; background:#f4ecd9 var(--paper-ivory) repeat; background-size:720px;
}
:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account .account-header { background:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui .help-card { padding:16px 84px 16px 20px; }

/* Approved bold forest rail: separate image faces, live navigation and labels. */
@media(min-width:1101px) {
  html:root[data-platform-theme=paper-adventure]:not(.publication-embedded) { --obsidian-sidebar:228px; --obsidian-inset:48px; }
}
@media(min-width:761px) and (max-width:1100px) {
  html:root[data-platform-theme=paper-adventure]:not(.publication-embedded) { --obsidian-sidebar:196px; }
}
/* One ivory page under everything, so the rail's torn edge and the faint
   mountain range read as paper laid on paper. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform {
  background:linear-gradient(#fffdf3a6,#fffdf3a6),#f4ecd9 var(--paper-ivory) 0 0/720px repeat!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform::after {
  content:""; position:fixed; right:0; bottom:0; z-index:0; width:min(1100px,72vw); aspect-ratio:3; pointer-events:none;
  background:var(--paper-landscape) center bottom/cover no-repeat; opacity:.3;
  -webkit-mask:linear-gradient(#0000,#000 55%),linear-gradient(90deg,#0000,#000 35%); -webkit-mask-composite:source-in;
  mask:linear-gradient(#0000,#000 55%),linear-gradient(90deg,#0000,#000 35%); mask-composite:intersect;
}
/* Keep the store and game library on the same quieter landscape. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform:has(:is(#storeView.active,#libraryView.active))::after {
  background-image:url('/static/media/ui/paper-adventure/store-landscape.png');
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform>.shell { position:relative; z-index:1; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform .shell>main { background:transparent!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account {
  background:linear-gradient(#fffdf3a6,#fffdf3a6),#f4ecd9 var(--paper-ivory) 0 0/720px repeat!important;
}
/* Library art belongs to the empty shelf, not behind the filter tabs. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView::before { display:none!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui #libraryList .ui-state[data-ui-state=empty]::before {
  content:""; display:block; width:min(340px,80%); aspect-ratio:2; margin:0 auto 14px;
  background:var(--paper-canopy) center/contain no-repeat; pointer-events:none;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account .app-shell {
  background:linear-gradient(#fffdf3bf,#fffdf3bf),var(--paper-ivory)!important; background-size:auto,720px!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(.shell>main h1,.shell>main h2,.section-head h2,.gazette-intro h1,#platformNavigation .ui-nav,.home-creator-card h2) {
  font-family:Georgia,"Times New Roman","Microsoft YaHei UI",serif;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #storeCatalogSection::after { display:none; }
:root[data-platform-theme=paper-adventure] body.feika-ui .store-filters { border-image:none!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#storeView,#gameView,#libraryView,#developerView,#userView) :is(.rank-tab,.dev-tab).active.active:not(:disabled) { color:#fff8e5!important; --control-metadata-ink:#fff8e5; text-decoration:none; }
@media(min-width:761px) {
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform>.shell>.topbar {
    border-image:none!important; background:none!important; padding-inline:10px 8px; overflow:visible; isolation:isolate;
  }
  /* The rail image is wider than the column: its torn right edge overlaps the page. */
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform>.shell>.topbar::before {
    content:""; position:absolute; inset:0 -30px 0 -12px; z-index:-1; pointer-events:none;
    /* The rail's top scenery is cropped away: the column starts as plain forest paper. */
    background:var(--paper-sidebar-forest) left bottom/100% 122% no-repeat;
    filter:drop-shadow(3px 0 4px #102f3238);
  }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation {
    border-image:none!important; background:transparent!important; overflow:visible;
  }
  html:root[data-platform-theme=paper-adventure] #storeChannelNavigation { padding-top:24px; gap:8px; }
}
html:root[data-platform-theme=paper-adventure] #storeChannelNavigation .discovery-brand { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav {
  min-height:44px; padding:7px 12px 9px 14px; gap:9px; font-size:15px; font-weight:700; letter-spacing:0;
  color:#173c3e!important; background:var(--paper-sidebar-tab) center/100% 100% no-repeat!important;
  border-radius:0!important; border-color:transparent!important;
  border-image:none!important;
  text-decoration:none; box-shadow:none!important;
  transition:translate .18s var(--tb-ease,ease),filter .18s;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:hover:not(.active):not([aria-current=page]) { translate:4px 0; filter:brightness(1.03); }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav::before {
  content:""; display:block; width:26px; height:26px; flex:none;
  background:var(--paper-sidebar-icon,var(--paper-nav-gamepad)) center/contain no-repeat!important;
  mask:none!important; -webkit-mask:none!important;
}
html:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-store-channel=ugc] { --paper-sidebar-icon:var(--paper-nav-cube); }
html:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-view=recommendationsView] { --paper-sidebar-icon:var(--paper-nav-star); }
html:root[data-platform-theme=paper-adventure] #platformNavigation .discovery-gazette { --paper-sidebar-icon:var(--paper-nav-news); }
html:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-view=settingsView] { --paper-sidebar-icon:var(--paper-nav-settings); }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:is(.active,[aria-current=page]):not(:disabled):not([aria-disabled=true]) {
  background:transparent var(--paper-sidebar-selected) center/100% 100% no-repeat!important;
  border-image:none!important; color:#173c3e!important;
  width:calc(100% + 14px); min-height:50px; font-size:16px; font-weight:800; --control-metadata-ink:#173c3e;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav.active::after { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card {
  position:relative; isolation:isolate; overflow:visible; min-height:196px; margin-top:auto; padding:52px 12px 16px 20px;
  background:var(--paper-portal-frame) center/100% 100% no-repeat!important;
  border:0!important; border-image:none!important; box-shadow:none!important; border-radius:0!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card::before {
  z-index:0; right:-10px; bottom:-4px; width:108px; height:118px;
  background:var(--paper-robot) right bottom/contain no-repeat!important; opacity:1;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card :is(h2,p) {
  position:relative; z-index:1; max-width:100%; color:#fff8e5!important; text-shadow:0 1px 1px #103535;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card h2 { font-size:18px; line-height:1.2; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card p { max-width:58%; margin-top:6px; font-size:11px; line-height:1.5; white-space:pre-line; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation #homeCreateBtn {
  z-index:1; width:40px; height:40px; min-height:40px; margin-top:10px;
  background:var(--paper-nav-arrow) center/contain no-repeat!important;
  border-image:none!important; border:0!important; color:#173c3e!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation #homeCreateBtn svg { visibility:hidden; }
/* Title bar follows the first approved Game System header: torn ivory paper islands. */
:root[data-workbench-theme=paper-adventure] .game-ui-toolbar {
  --tb-tab-bg:transparent; --tb-tab-text:#fff8e5; --tb-tab-hover:transparent;
  --tb-field:transparent; --tb-field-focus:transparent; --tb-hover:#205c5b17;
  --tb-accent:#205c5b; --tb-border:#c3ad82; --tb-shadow:none;
  isolation:isolate;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-tool-island {
  align-self:stretch; min-height:0; padding:0 26px 6px 22px; gap:4px;
  border:0!important; border-radius:0!important; box-shadow:none!important; background:transparent!important;
  border-image:var(--paper-topbar) 40 44 44 44 fill / 15px 17px 17px / 0 stretch!important;
  filter:drop-shadow(0 2px 2px #102f3229);
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-tool-island-start { padding-left:16px; }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-tool-island::before,
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-tool-island::after { display:none; }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar :is(.client-brand,.game-ui-title) { color:var(--paper-ink); }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-brand {
  display:inline-flex; align-items:center; gap:7px; height:40px; margin-right:8px; padding:0 16px 0 0;
  font:900 25px/1 "Segoe UI Black","Arial Black","Microsoft YaHei UI",sans-serif; letter-spacing:1px;
  border-right:1.5px solid var(--tb-border);
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-brand::before {
  content:""; width:30px; height:30px; flex:none;
  background:var(--paper-categories) 20% 50%/600% auto no-repeat;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab {
  position:relative; height:42px; padding:0 15px 0 11px; gap:8px; color:var(--paper-ink)!important;
  font-size:15px; font-weight:600; border:0!important; border-radius:0!important;
  border-image:none!important; background:transparent!important;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab>svg { display:none; }
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab::before {
  content:""; width:28px; height:28px; flex:none; background:var(--paper-nav-gamepad) center/contain no-repeat;
  transition:transform .22s var(--tb-spring);
}
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab+button.client-platform-tab { margin-left:9px; }
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab+button.client-platform-tab::before { background-image:var(--paper-nav-books); }
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab+button.client-platform-tab::after {
  content:""; position:absolute; left:-6px; top:9px; bottom:9px; width:1.5px; background:var(--tb-border); pointer-events:none;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab:hover:not(:disabled)::before { transform:rotate(-8deg) scale(1.08); }
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab[aria-pressed=true]:not(:disabled):not(#feika-none) {
  color:#fff8e5!important; font-weight:700; height:38px; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-shell[data-mode=platform] .game-ui-toolbar .game-ui-navigation>button.client-platform-tab[aria-pressed=true]:not(:disabled)::before {
  filter:none;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search,
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search:focus-within { flex:0 1 420px; width:420px; min-width:200px; max-width:420px; }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search {
  height:38px; margin-left:12px; color:var(--paper-muted); border:0!important; border-radius:0!important;
  background:transparent!important; border-image:var(--paper-field-face)!important;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search:focus-within { color:var(--paper-ink); }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search input {
  height:30px!important; border-image:none!important; color:var(--paper-ink)!important; font-size:13px;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search kbd {
  color:var(--paper-muted); background:#efe3c7; border-color:var(--tb-border);
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar :is(.game-ui-actions,.game-ui-window-controls) button { color:var(--paper-ink); }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar :is(.client-icon-action,.game-ui-actions>button) svg { width:20px; height:20px; color:#205c5b; }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-account-avatar {
  width:32px; height:32px; background:#d9e4ce; border:1.5px solid #a9bfa1; color:#205c5b; font-weight:700; font-size:14px;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-account-name { color:var(--paper-ink); font-size:13px; font-weight:600; }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .game-ui-window-controls { margin-left:6px; }
:root[data-platform-theme=paper-adventure] :is(.gazette-card,.gazette-issue,.gazette-sheet) {
  background:transparent!important; border-image:var(--paper-note) 10% fill / 10px / 0 stretch!important;
}
@media(max-height:900px) and (min-width:761px) {
  html:root[data-platform-theme=paper-adventure] #storeChannelNavigation { padding-top:18px; gap:7px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav { min-height:40px; padding-block:6px 8px; font-size:14px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav::before { width:24px; height:24px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:is(.active,[aria-current=page]) { min-height:46px; font-size:15px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card { min-height:178px; padding-top:44px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card::before { width:96px; height:106px; }
}
@media(max-height:740px) and (min-width:761px) {
  html:root[data-platform-theme=paper-adventure] #storeChannelNavigation { padding-top:12px; gap:8px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav { min-height:38px; padding-block:5px 7px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card { min-height:150px; padding-top:26px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card::before { width:84px; height:96px; }
}
/* Paper faces never sit on the shared selection fill. */
html:root[data-platform-theme=paper-adventure] body.feika-ui :is(#platformNavigation,.side-nav) {
  --platform-selection-face:transparent; --platform-selection-hover:transparent; --platform-selection-grain:none;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account .side-nav .ui-control:is(:hover,:focus-visible,[aria-current=page]) { text-decoration:none!important; }
/* Clear breathing room under the native title bar. */
@media(min-width:761px) {
  html[data-platform-theme=paper-adventure]:is(.feika-client-chrome,.feika-host-chrome) body.feika-ui.feika-platform>.shell>main>.view:not(#gameView,#accountView) {
    padding-top:calc(var(--platform-client-top) + 40px);
  }
  html.account-under-client-chrome[data-platform-theme=paper-adventure] body.feika-ui.feika-account {
    padding-top:calc(var(--platform-account-client-top,0px) + 28px)!important;
  }
}
/* Account center: no page banner; the section bar is one torn strip. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account #accountHeader { display:none!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account .sidebar { border-image:none!important; background:none!important; box-shadow:none!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account .side-nav {
  padding:10px 16px 12px; border-image:var(--paper-strip) 33% 3% 32% 3% fill / 5px 8px / 3px 2px stretch!important;
  filter:drop-shadow(0 2px 2px #102f3229);
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-account .side-nav .ui-control { min-height:38px; padding-inline:10px 12px; gap:2px; }
/* The 220px rail tier: smaller faces, and a shorter torn overhang beside the page. */
@media(min-width:761px) and (max-width:1100px) {
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform>.shell>.topbar::before { inset-inline-end:-18px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform>.shell>.topbar { padding-inline:8px 6px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav { min-height:38px; padding:6px 10px 8px 10px; gap:7px; font-size:13px; white-space:nowrap; letter-spacing:-.2px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav::before { width:22px; height:22px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:is(.active,[aria-current=page]) { min-height:44px; font-size:14px; width:calc(100% + 10px); }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card { min-height:160px; padding:40px 10px 12px 16px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card h2 { font-size:15px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card p { max-width:62%; font-size:10.5px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .home-creator-card::before { width:84px; height:92px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation #homeCreateBtn { width:34px; height:34px; min-height:34px; margin-top:6px; }
}
@media(max-width:760px) {
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation {
    border-image:none!important; background:var(--paper-sidebar-forest) center/100% 100% no-repeat!important;
  }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:is(.active,[aria-current=page]) { width:100%; }
}

/* Publishing page inside the workbench pane: the pane is the paper, so the page is
   transparent and flat; tabs and fields are the same rounded chips as the platform. */
html.publication-embedded:root[data-platform-theme=paper-adventure] {
  color-scheme:light; background:transparent!important;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui,
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui .shell>main { background:transparent!important; }
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.dev-workspace,.dev-workspace-head,.dev-workspace-body,.publication-section,.ui-form-grid,.dev-tags-field,.tag-editor,.dev-actionbar) {
  background:transparent!important; border:0!important; border-image:none!important; box-shadow:none!important; filter:none!important; border-radius:0!important;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .publication-runtime-section {
  padding-top:14px; border-top:1px dashed #b9a57c!important;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(h3,.publication-section-head h3) {
  color:var(--paper-ink)!important; font:700 19px/1.3 Georgia,"Noto Serif SC","Songti SC","SimSun",serif;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.muted,.dev-pane-hint,.fine.muted) { color:var(--paper-muted)!important; }
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .ui-field-label { color:var(--paper-ink)!important; font-weight:700; }
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.dev-tabs,.content-language-tabs) {
  gap:4px; padding:0; border:0!important; border-image:none!important; background:transparent!important; box-shadow:none!important;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.dev-tabs,.content-language-tabs)>button.ui-control {
  min-height:36px; padding:0 14px!important; color:var(--paper-ink)!important; font-weight:600; text-decoration:none!important;
  background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.dev-tabs,.content-language-tabs)>button.ui-control[aria-selected=true] {
  color:#fff8e5!important; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.dev-tabs,.content-language-tabs)>button.ui-control::after { display:none!important; }
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {
  padding-inline:12px!important; color:var(--paper-ink)!important; background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-field-face)!important; box-shadow:none!important;
}
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui::after { display:none!important; }
html.publication-embedded:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .content-language-control { border-bottom:1px dashed #b9a57c!important; }

/* Sidebar follows the approved forest dashboard: items are white line icons and text on
   the forest; only the current page is a gold pill. */
html:root[data-platform-theme=paper-adventure] {
  --paper-line-gamepad:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.2 7.5h9.6a4 4 0 0 1 3.9 3.3l.8 4.6a2.4 2.4 0 0 1-4.2 2l-1.8-2H8.5l-1.8 2a2.4 2.4 0 0 1-4.2-2l.8-4.6a4 4 0 0 1 3.9-3.3z'/%3E%3Cpath d='M7.5 10.5v3M6 12h3'/%3E%3Ccircle cx='15.5' cy='11' r='.5' fill='%23000'/%3E%3Ccircle cx='17.3' cy='13' r='.5' fill='%23000'/%3E%3C/svg%3E");
  --paper-line-cube:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 20.2 7.4v9.2L12 21.2l-8.2-4.6V7.4z'/%3E%3Cpath d='M3.8 7.4 12 12l8.2-4.6M12 12v9.2'/%3E%3C/svg%3E");
  --paper-line-star:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 2.9 5.9 6.5.9-4.7 4.6 1.1 6.4L12 17.4l-5.8 3 1.1-6.4-4.7-4.6 6.5-.9z' fill='%23000'/%3E%3C/svg%3E");
  --paper-line-news:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4.5h12v14a2 2 0 0 0 2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M16 8.5h4v10a2 2 0 0 1-4 0'/%3E%3Cpath d='M7.5 8.5h5v3.5h-5zM7.5 15h5M7.5 17.5h3'/%3E%3C/svg%3E");
  --paper-line-settings:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M10.3 2.5h3.4l.5 2.6a7.6 7.6 0 0 1 1.9 1.1l2.5-.9 1.7 2.9-2 1.7a7.6 7.6 0 0 1 0 2.2l2 1.7-1.7 2.9-2.5-.9a7.6 7.6 0 0 1-1.9 1.1l-.5 2.6h-3.4l-.5-2.6a7.6 7.6 0 0 1-1.9-1.1l-2.5.9-1.7-2.9 2-1.7a7.6 7.6 0 0 1 0-2.2l-2-1.7 1.7-2.9 2.5.9a7.6 7.6 0 0 1 1.9-1.1zM12 9.1a3.4 3.4 0 1 0 0 6.8 3.4 3.4 0 0 0 0-6.8z'/%3E%3C/svg%3E");
  --paper-line-flame:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.5 2.5c.6 3-1 4.6-2.4 6.1C8.7 10.1 7 11.8 7 14.6A5 5 0 0 0 12 19.6a5 5 0 0 0 5-5c0-2-1-3.3-1.8-4.3-.2 1.3-.8 2.2-1.7 2.6.4-2.8-.2-7.4-1-10.4z'/%3E%3C/svg%3E");
  --paper-line-clock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
  --paper-line-star-outline:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3.2 2.7 5.5 6 .9-4.3 4.2 1 6-5.4-2.8-5.4 2.8 1-6-4.3-4.2 6-.9z' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  --paper-line-tag:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3.5 4.5v6.8l9.2 9.2 7.8-7.8-9.2-9.2H4.5a1 1 0 0 0-1 1z'/%3E%3Ccircle cx='8' cy='8.5' r='1.4'/%3E%3C/svg%3E");
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav {
  position:relative; width:100%; min-height:46px; padding:0 14px; gap:13px; white-space:nowrap;
  font:500 16px/1.2 "Segoe UI","Microsoft YaHei UI",sans-serif; letter-spacing:0; color:#f4eedc!important;
  background:transparent!important; border:0!important; border-radius:10px!important; border-image:none!important; box-shadow:none!important;
  transition:background-color .18s,color .18s;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:hover:not(.active):not([aria-current=page]) {
  translate:none; filter:none; background:#ffffff14!important; color:#fff!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav::before {
  width:24px; height:24px; background:currentColor!important;
  -webkit-mask:var(--paper-line-icon,var(--paper-line-gamepad)) center/contain no-repeat!important;
  mask:var(--paper-line-icon,var(--paper-line-gamepad)) center/contain no-repeat!important;
}
html:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-store-channel=ugc] { --paper-line-icon:var(--paper-line-cube); }
html:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-view=recommendationsView] { --paper-line-icon:var(--paper-line-star); }
html:root[data-platform-theme=paper-adventure] #platformNavigation .discovery-gazette { --paper-line-icon:var(--paper-line-news); }
html:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-view=settingsView] { --paper-line-icon:var(--paper-line-settings); }
/* Hairlines between the plain items, as in the reference. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:not(.active):not([aria-current=page]):not([data-view=settingsView])::after {
  content:""; display:block; position:absolute; left:12px; right:12px; bottom:-4px; height:1px; background:#ffffff1f; pointer-events:none;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:is(.active,[aria-current=page]):not(:disabled):not([aria-disabled=true]) {
  width:calc(100% + 14px); min-height:50px; padding:7px 12px 9px 14px; color:#173c3e!important; --control-metadata-ink:#173c3e;
  font:800 16px/1.2 Georgia,"Times New Roman","Microsoft YaHei UI",serif;
  background:transparent var(--paper-sidebar-selected) center/100% 100% no-repeat!important;
  border-radius:0!important; border-image:none!important; box-shadow:none!important;
}
@media(max-height:900px) and (min-width:761px) {
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav { min-height:42px; font-size:15px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:is(.active,[aria-current=page]) { min-height:46px; font-size:15px; }
}
@media(min-width:761px) and (max-width:1100px) {
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav { min-height:40px; padding:0 10px; gap:10px; font-size:14px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav::before { width:21px; height:21px; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #platformNavigation .ui-nav:is(.active,[aria-current=page]) { width:calc(100% + 10px); min-height:44px; font-size:14px; }
}
/* Ranking switches: one row of rounded chips with a small line icon. */
html:root[data-platform-theme=paper-adventure] body.feika-ui .rank-tab[data-rank-tab] {
  display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:0 15px 0 12px;
  font:500 14px/1 "Segoe UI","Microsoft YaHei UI",sans-serif; text-decoration:none;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui .rank-tab[data-rank-tab]::before {
  content:""; width:17px; height:17px; flex:none; background:currentColor;
  -webkit-mask:var(--rank-icon,var(--paper-line-flame)) center/contain no-repeat; mask:var(--rank-icon,var(--paper-line-flame)) center/contain no-repeat;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui .rank-tab.active[data-rank-tab]::before { background:#f3b94b; }
/* The shared rules keep selected tabs as underlines; on paper the selection is a filled chip.
   :not(#feika-none) and the view list only lift these above the shared underline rules. */
html:not(.publication-embedded):root[data-platform-theme=paper-adventure] body.feika-ui [data-ui-control=tab][aria-selected=true]:not(:disabled):not(#feika-none),
html:not(.publication-embedded):root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#storeView,#libraryView,#gameView,#settingsView,#userView,#friendsView,#developerView) [data-ui-control=tab][aria-selected=true]:not(:disabled) {
  color:#fff8e5!important; --control-metadata-ink:#fff8e5; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important; font-weight:600; text-decoration:none!important;
}
html:not(.publication-embedded):root[data-platform-theme=paper-adventure] body.feika-ui [data-ui-control=tab]::after { display:none!important; }

html:root[data-platform-theme=paper-adventure] .rank-tab[data-rank-tab=updated] { --rank-icon:var(--paper-line-clock); }
html:root[data-platform-theme=paper-adventure] .rank-tab[data-rank-tab=rated] { --rank-icon:var(--paper-line-star-outline); }
html:root[data-platform-theme=paper-adventure] .rank-tab[data-rank-tab=new] { --rank-icon:var(--paper-line-tag); }
/* Title-bar search: a white rounded field with a shortcut chip. */
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search {
  height:34px; padding:0 5px 0 13px; gap:9px; color:#6b786f;
  background:#fffdf6!important; border:1px solid #d6c8a6!important; border-radius:10px!important; border-image:none!important;
  box-shadow:inset 0 1px 2px #5b4a2e14,0 1px 0 #ffffffb3!important;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search:hover:not(:focus-within) { border-color:#bfae86!important; }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search:focus-within {
  color:#205c5b; background:#fff!important; border-color:#7fa09a!important; box-shadow:0 0 0 3px #205c5b1f!important;
}
/* :not(#feika-none) lifts the field above the shared inset input face. */
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search input:not(#feika-none) {
  height:30px!important; padding:0!important; font:14px/1 "Segoe UI","Microsoft YaHei UI",sans-serif;
  background:transparent!important; border:0!important; border-image:none!important; box-shadow:none!important;
}
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search input::placeholder { color:#7d877f; }
html:root[data-workbench-theme=paper-adventure] .game-ui-toolbar .client-search kbd {
  padding:3px 7px; color:#54665c; background:#f6efdf; border:1px solid #d6c8a6; border-radius:6px;
  font:600 11px/1.3 "Segoe UI",sans-serif; letter-spacing:.3px;
}

/* Library header: one smooth paper band holding the title, filters and sort on a single row. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-eyebrow { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-section-title { display:none; }
@media(min-width:761px) {
  /* The title bar owns search in the client, so the empty search row goes too. */
  html[data-platform-theme=paper-adventure]:is(.feika-client-chrome,.feika-host-chrome) body.feika-ui.feika-platform #libraryView .library-topbar { display:none; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView.active {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-content:start;
  }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView>* { grid-column:1/-1; min-width:0; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView>.library-topbar { grid-row:1; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView>.library-toolbar {
    grid-row:2; box-sizing:border-box; height:60px; margin:0 0 18px!important; padding:0 230px 0 12px!important;
    justify-content:flex-start; flex-wrap:nowrap; gap:22px;
    background:#f6ecd6 var(--paper-ivory) center/720px repeat!important;
    border:1px solid #dccca6!important; border-radius:14px!important;
    box-shadow:inset 0 1px 0 #fffaf0,0 1px 3px #5b4a2e1f!important;
  }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView>.library-section-head {
    grid-row:2; grid-column:2; z-index:1; height:60px; margin:0 14px 0 0; justify-content:flex-end;
  }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView>#librarySyncStatus { grid-row:3; }
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView>.library-list { grid-row:4; }
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-toolbar h1 { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView #libraryFilters .library-filter-button { min-height:34px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-sort>summary { min-height:34px; }

/* Toasts (launch / status notices) are short strips: a clean rounded paper card, not the framed dialog. */
:root:is([data-workbench-theme=paper-adventure],[data-platform-theme=paper-adventure]) :is(.ui-toast,.toast-item):not(#feika-none) {
  padding:10px 16px!important; color:var(--paper-ink)!important; background:#fffaf0!important;
  border:1px solid #d5c7a5!important; border-radius:10px!important; border-image:none!important;
  box-shadow:inset 0 1px 0 #ffffff,0 6px 16px #102f322e!important; filter:none!important;
}

/* Ranking switches share the library band: one smooth paper strip, chips inside it. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankTabs {
  display:flex; align-items:center; gap:4px; padding:4px; min-height:0;
  background:#f6ecd6 var(--paper-ivory) center/720px repeat!important;
  border:1px solid #dccca6!important; border-radius:12px!important; border-image:none!important;
  box-shadow:inset 0 1px 0 #fffaf0,0 1px 3px #5b4a2e1f!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankTabs .rank-tab[data-rank-tab]:not(.active):not(#feika-none) {
  min-height:34px; background:transparent!important; border-color:transparent!important; box-shadow:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankTabs .rank-tab[data-rank-tab]:not(.active):hover:not(#feika-none) { background:#fffaf0b3!important; border-color:#d5c7a5!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankTabs .rank-tab.active[data-rank-tab] { min-height:34px; }

/* Paper motion: cards lift like picked-up paper, selections slide or pop into place,
   and the creator corner breathes. Layered on the platform's shared motion. */
@keyframes paper-tab-in { from { opacity:.5; translate:-16px 0; } 65% { opacity:1; translate:3px 0; } }
@keyframes paper-chip-pop { 0% { scale:.9; } 60% { scale:1.05; } }
@keyframes paper-shine { from { translate:-120% 0; } to { translate:120% 0; } }
@keyframes paper-play-ring { from { outline-offset:0; outline-color:#1f4f4d80; } to { outline-offset:9px; outline-color:#1f4f4d00; } }
@keyframes paper-bob { 50% { translate:0 -5px; } }
@keyframes paper-nudge { 0%,70%,100% { translate:0 0; } 80% { translate:4px 0; } 90% { translate:-1px 0; } }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #libraryView .library-card-art::after {
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none; translate:-120% 0;
  background:linear-gradient(105deg,transparent 30%,#fff8e566 48%,transparent 66%);
}
@media(prefers-reduced-motion:no-preference) {
  html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform {
    --paper-spring:cubic-bezier(.34,1.45,.64,1);
    & #libraryView .library-card:not(#feika-none) { translate:none; transition:transform .34s var(--paper-spring),filter .3s ease; }
    @media(hover:hover) {
      & #libraryView .library-card:not(.is-launch-locked):hover:not(#feika-none) { transform:translateY(-6px) rotate(-.6deg); filter:drop-shadow(0 14px 14px #3a2c1438); }
      & #libraryView .library-card:nth-child(even):not(.is-launch-locked):hover:not(#feika-none) { transform:translateY(-6px) rotate(.6deg); }
      & #libraryView .library-card:not(.is-launch-locked):hover .library-card-art:not(#feika-none) { box-shadow:inset 0 0 0 1px #5b4a2e33; }
      & #libraryView .library-card:not(.is-launch-locked):hover .library-card-art::after { animation:paper-shine .9s ease-out; }
      & #libraryView .library-card:not(.is-launch-locked):hover .library-primary-action:not(:disabled) { outline:2px solid transparent; animation:paper-play-ring 1.5s ease-out infinite; }
      & :is(#libraryFilters .library-filter-button,#homeRankTabs .rank-tab,#librarySort>summary,#storeSort):not(.active):hover { translate:0 -1px; }
      & #platformNavigation .ui-nav:not(.active):not([aria-current=page]):hover::before { scale:1.15; rotate:-6deg; }
    }
    & #platformNavigation .ui-nav::before { transition:scale .26s var(--paper-spring),rotate .26s var(--paper-spring); }
    & #platformNavigation .ui-nav:is(.active,[aria-current=page]) { animation:paper-tab-in .5s var(--paper-spring); }
    & :is(#libraryFilters .library-filter-button.active,#homeRankTabs .rank-tab.active,[data-ui-control=tab][aria-selected=true]) { animation:paper-chip-pop .36s var(--paper-spring); }
    & #platformNavigation .home-creator-card::before { animation:paper-bob 3.6s ease-in-out infinite; }
    & #homeCreateBtn { animation:paper-nudge 3.2s ease-in-out infinite; }
  }
}

/* Tab groups: only the selected tab is a button. The others are plain ink on the group's paper band,
   so the eye lands on the selection. */
html:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.dev-tabs,.content-language-tabs):not(#feika-none) {
  display:inline-flex; align-items:center; gap:2px; padding:3px; width:max-content; max-width:100%;
  background:#f1e6cc var(--paper-ivory) center/720px repeat!important;
  border:1px solid #dccca6!important; border-radius:10px!important; border-image:none!important;
  box-shadow:inset 0 1px 2px #5b4a2e1a!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui :is(
  #developerView :is(.dev-tabs,.content-language-tabs)>button.ui-control:not([aria-selected=true]),
  #libraryFilters .library-filter-button:not(.active),
  [data-ui-control=tab]:not([aria-selected=true]):not(.active),
  [role=tab]:not([aria-selected=true]):not(.active)
):not(#feika-none) {
  color:var(--paper-muted)!important; font-weight:600; background:transparent!important;
  border:0!important; border-radius:7px!important; border-image:none!important; box-shadow:none!important; filter:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui :is(
  #developerView :is(.dev-tabs,.content-language-tabs)>button.ui-control:not([aria-selected=true]),
  #libraryFilters .library-filter-button:not(.active),
  [data-ui-control=tab]:not([aria-selected=true]):not(.active),
  [role=tab]:not([aria-selected=true]):not(.active)
):hover:not(:disabled):not(#feika-none) { color:var(--paper-ink)!important; background:#205c5b14!important; border-image:none!important; }

/* ===== Package platform =====
   Every package page opens with the same smooth paper header band; the store keeps a wide
   featured banner with a compact pick list beside it. Tags and capability notes are small
   pills, not buttons, so the only buttons on a card are its actions. */
:root[data-platform-theme=paper-adventure] {
  --paper-line-store:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5 5.6 4h12.8L20 9.5M4 9.5v10h16v-10M4 9.5h16M4 9.5a2.7 2.7 0 0 0 5.3 0 2.7 2.7 0 0 0 5.4 0 2.7 2.7 0 0 0 5.3 0M9.5 19.5v-5h5v5'/%3E%3C/svg%3E");
  --paper-line-box:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3.5 7.5v9L12 21l8.5-4.5v-9Z'/%3E%3Cpath d='M3.5 7.5 12 12l8.5-4.5M12 12v9M7.8 5.2l8.5 4.6'/%3E%3C/svg%3E");
  --paper-line-upload:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5V4M7 8.5 12 4l5 4.5M4 15v3.5A1.5 1.5 0 0 0 5.5 20h13a1.5 1.5 0 0 0 1.5-1.5V15'/%3E%3C/svg%3E");
}
html.package-platform:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-view=storeView] { --paper-line-icon:var(--paper-line-store); }
html.package-platform:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-view=currentPackagesView] { --paper-line-icon:var(--paper-line-box); }
html.package-platform:root[data-platform-theme=paper-adventure] #platformNavigation .ui-nav[data-view=developerView] { --paper-line-icon:var(--paper-line-upload); }

/* Header bands. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#storeView>.package-store-toolbar,#currentPackagesView>.section-head,#developerView>.developer-page-toolbar):not(#feika-none) {
  display:flex; align-items:center; justify-content:space-between; gap:16px; box-sizing:border-box; min-height:64px;
  margin:0 0 20px!important; padding:10px 14px 10px 22px!important;
  background:#f6ecd6 var(--paper-ivory) center/720px repeat!important; border:1px solid #dccca6!important; border-radius:14px!important;
  border-image:none!important; box-shadow:inset 0 1px 0 #fffaf0,0 1px 3px #5b4a2e1f!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView>.developer-page-toolbar:not(#feika-none)::before,
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView>.developer-page-toolbar:not(#feika-none)::after { display:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #storeView>.package-store-toolbar::before {
  content:"包商城"; flex:1 1 auto; color:var(--paper-ink); font:700 21px/1.2 Georgia,"Noto Serif SC","Songti SC","SimSun",serif;
}
html.package-platform:root[data-platform-theme=paper-adventure][lang^=en] body.feika-ui.feika-platform #storeView>.package-store-toolbar::before { content:"Packages"; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #storeView>.package-store-toolbar::after { display:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #storeView>.package-store-toolbar>.store-filters:not(#feika-none) { flex:0 0 auto; width:auto; margin:0 0 0 auto; display:flex; gap:8px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#currentPackagesView>.section-head h1,#developerView .dev-page-hint) { margin:0; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #currentPackagesView>.section-head h1 { font:700 21px/1.2 Georgia,"Noto Serif SC","Songti SC","SimSun",serif; color:var(--paper-ink); }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#ppHostSummary,#developerView .dev-page-hint) { margin-top:3px!important; color:var(--paper-muted)!important; font-size:13px; line-height:1.5; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-page-hint { max-width:none; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#storeSort,#ppRescanBtn,#newPackageBtn):not(#feika-none) { min-height:38px; height:38px; }

/* Featured banner: picture left, copy right; picks beside it as a compact list. */
@media(min-width:1000px) {
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #storeContent>.ui-feature-layout {
    display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:18px; align-items:stretch; margin-bottom:28px;
  }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredCarousel { position:relative; min-height:0; height:auto; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredArt:not(#feika-none) {
    display:grid; grid-template-columns:minmax(0,1.2fr) minmax(250px,1fr); height:100%; min-height:330px;
  }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredArt>.ui-feature-media { position:relative; height:auto; min-height:330px; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredArt>.ui-feature-copy {
    position:static; display:flex; flex-direction:column; justify-content:center; gap:12px; padding:26px 30px 52px; background:none!important;
  }
  /* Controls span the banner: arrows sit on the picture's edges, dots at the copy's foot. */
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredCarousel .ui-feature-controls:not(#feika-none) { position:absolute; inset:0; width:auto; height:auto; padding:0; pointer-events:none; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredCarousel .ui-feature-controls>*:not(#feika-none) { pointer-events:auto; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredCarousel .ui-feature-arrow:not(#feika-none) { position:absolute; top:calc(50% - 18px); bottom:auto; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredCarousel .ui-feature-prev:not(#feika-none) { left:14px; right:auto; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredCarousel .ui-feature-next:not(#feika-none) { left:auto; right:calc(45.5% + 14px); }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredCarousel .ui-feature-dots:not(#feika-none) { position:absolute; left:auto; right:30px; bottom:18px; top:auto; transform:none; }
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredTitle { font:700 30px/1.2 Georgia,"Noto Serif SC","Songti SC","SimSun",serif; color:var(--paper-ink); margin:0; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredSummary { max-height:4.8em; color:var(--paper-muted); font-size:14px; line-height:1.6; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform .ui-feature-eyebrow { color:#8a5a14; font-size:12px; font-weight:700; letter-spacing:.08em; }

/* Pick list: rows on the paper, the chosen one is a lighter sheet with a teal edge. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks { display:flex; flex-direction:column; gap:6px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks>.ui-feature-pick:not(#feika-none) {
  display:grid; grid-template-columns:64px minmax(0,1fr); align-items:center; gap:12px; min-height:0; height:auto; padding:8px 10px!important;
  color:var(--paper-ink)!important; text-align:left; background:transparent!important; border:0!important; border-radius:10px!important;
  border-image:none!important; box-shadow:none!important; filter:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks>.ui-feature-pick:hover:not(#feika-none) { background:#205c5b12!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks>.ui-feature-pick.active:not(#feika-none) {
  background:#fffaf0!important; box-shadow:inset 3px 0 0 #1f4f4d,0 1px 3px #5b4a2e1f!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks .ui-feature-pick .cover.sm { width:64px; height:48px; border-radius:6px; overflow:hidden; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks :is(.ui-feature-pick-title,.ui-feature-pick-summary,.ui-feature-pick-author,.rating) { color:inherit!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks .ui-feature-pick-title { font-size:14px; font-weight:700; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks .ui-feature-pick-summary { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks .ui-feature-pick-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin-top:4px; color:var(--paper-muted)!important; font-size:12px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #heroPicks .ui-feature-pick-meta .ui-counter:not(#feika-none) { display:none; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform .ui-feature-list>.ui-dialog-header:not(#feika-none) {
  padding:14px 18px 10px; background:transparent!important; border:0!important; border-bottom:1px solid #e1d3b1!important; border-image:none!important; box-shadow:none!important; filter:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform .ui-feature-list .ui-dialog-title { font:700 17px/1.3 Georgia,"Noto Serif SC","SimSun",serif; color:var(--paper-ink); }

/* Tags and capability notes are pills. The chosen tag in the filter bar is filled teal. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is([data-store-tag],.card-tags-more):not(#feika-none),
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform .ui-counter[data-ui-counter=metadata]:not(#feika-none) {
  display:inline-flex; align-items:center; min-height:0; height:24px; padding:0 10px!important; gap:4px;
  color:#5a4a2c!important; font:600 12px/1 "Segoe UI","Microsoft YaHei UI",sans-serif; background:#efe3c6!important;
  border:1px solid #dac9a1!important; border-radius:999px!important; border-image:none!important; box-shadow:none!important; filter:none!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform .ui-counter[data-ui-counter=metadata]:not(#feika-none) { color:var(--paper-muted)!important; background:transparent!important; border-style:dashed!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is([data-store-tag],.card-tags-more):hover:not(#feika-none) { color:var(--paper-ink)!important; background:#e7d8b5!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #storeTagBar:not(#feika-none) { gap:6px; flex-wrap:wrap; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #storeTagBar>[data-store-tag]:not(#feika-none) { height:30px; padding:0 14px!important; font-size:13px; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #storeTagBar>[data-store-tag]:is(.active,[aria-pressed=true]):not(#feika-none) {
  color:#fff8e5!important; background:#1f4f4d!important; border-color:#173c3e!important;
}

/* Rank board: the previewed row is a lighter sheet with a teal edge. */
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankList .rank-row { border-radius:10px; transition:background-color .15s; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankList .rank-row:hover { background:#205c5b0f!important; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankList .rank-row.active:not(#feika-none) {
  background:#fffaf0!important; box-shadow:inset 3px 0 0 #1f4f4d,0 1px 3px #5b4a2e1f!important;
}
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankList .rank-no { color:#b08a4a; font:700 15px/1 Georgia,serif; }
html:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankList .rank-row.active .rank-no { color:#1f4f4d; }

/* Current packages: a real empty state rather than a line of text. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #currentPackagesTable>.ui-state {
  display:grid; justify-items:center; gap:8px; padding:196px 24px 40px; text-align:center;
  background:#fbf5e6 var(--paper-empty-inventory) center 26px/150px auto no-repeat!important;
  border:1px solid #e1d3b1; border-radius:14px; box-shadow:0 1px 3px #5b4a2e14;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #currentPackagesTable .ui-state-title { color:var(--paper-ink); font:700 18px/1.3 Georgia,"Noto Serif SC","SimSun",serif; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packageDiagnostics:not(#feika-none) {
  margin-top:16px; padding:12px 16px; background:transparent!important; border:1px dashed #cdbb92!important; border-radius:12px!important; border-image:none!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packageDiagnostics>summary { color:var(--paper-muted); font-size:13px; }

/* Upload: list and editor sit side by side as two paper sheets; the editor uses the same flat
   fields as the workbench publishing pane, and field help is a small round "?" by the label. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell { display:grid; grid-template-columns:280px minmax(0,1fr); gap:18px; align-items:start; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-sidebar,
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-workspace {
  width:auto; margin:0; background:#fbf5e6!important; border:1px solid #e1d3b1!important; border-radius:14px!important;
  border-image:none!important; box-shadow:0 1px 3px #5b4a2e14!important; filter:none!important; overflow:hidden;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-sidebar { position:sticky; top:12px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-sidebar>.panel-head {
  padding:14px 16px; background:transparent!important; border:0!important; border-bottom:1px solid #e1d3b1!important; border-image:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView :is(.dev-workspace-head,.dev-workspace-body,.dev-pane,.publication-section,.ui-form-grid,.dev-tags-field,.tag-editor,.dev-actionbar,.panel-body):not(#feika-none) {
  background:transparent!important; border:0!important; border-image:none!important; box-shadow:none!important; filter:none!important; border-radius:0!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-workspace-head { padding:20px 24px 0; border-bottom:1px solid #e1d3b1!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #packageEditorName { font:700 22px/1.3 Georgia,"Noto Serif SC","SimSun",serif; color:var(--paper-ink); }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-tabs:not(#feika-none) { margin:14px 0 14px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-workspace-body { padding:6px 24px 18px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .mobile-dev-editor-back { display:none; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .publication-runtime-section { padding-top:14px; border-top:1px dashed #b9a57c!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .ui-field-label { color:var(--paper-ink)!important; font-weight:700; min-height:0; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select):not(#feika-none) { min-height:40px; height:40px; padding-inline:12px!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .ui-field-help-host { position:relative; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .ui-field-help>summary:not(#feika-none) {
  position:absolute; top:0; right:0; width:22px; min-width:0; height:22px; min-height:0; padding:0!important;
  color:var(--paper-muted)!important; font:700 12px/1 "Segoe UI",sans-serif; background:transparent!important;
  border:1px solid #cdbb92!important; border-radius:50%!important; border-image:none!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .ui-field-help>summary:hover:not(#feika-none) { color:var(--paper-ink)!important; border-color:#1f4f4d!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .ui-field-help[open]>p { margin:6px 0 0; padding:8px 12px; color:var(--paper-muted); font-size:12px; background:#f3e9d2; border-radius:8px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-actionbar { position:sticky; bottom:0; padding:12px 0 4px; background:#fbf5e6!important; border-top:1px solid #e1d3b1!important; }
/* ===== Account sign-in =====
   An open storybook on the teal desk: the left page is a framed illustration (landscape with a
   floating island and the wordmark), the right page holds the greeting, the switch and the form. */
:root[data-platform-theme=paper-adventure] body.feika-account:has(#authView:not(.hide):not([hidden])) {
  background:#174e50!important;
}
:root[data-platform-theme=paper-adventure] body.feika-account:has(#authView:not(.hide):not([hidden]))::before {
  content:""; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:radial-gradient(ellipse at 50% 45%,#2a6b6a33 0,#0b2f3166 70%,#071f21b3 100%);
}
:root[data-platform-theme=paper-adventure] body.feika-account:has(#authView:not(.hide):not([hidden])) :is(.app-shell,.page) { position:relative; z-index:1; background:transparent!important; }
:root[data-platform-theme=paper-adventure] body.feika-account .page:has(>#authView:not(.hide):not([hidden])) {
  /* Fixed to the window: the account page is zoomed, so 100vh would overshoot it. */
  position:fixed!important; inset:0; display:grid!important; place-items:center; overflow:auto;
  width:auto; min-height:0; box-sizing:border-box; padding:24px!important; max-width:none!important; margin:0!important;
}

/* The book: cream paper with a thin gold inner rule and a spine shadow down the middle. */
:root[data-platform-theme=paper-adventure] body.feika-account #authView:not(#feika-none) {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0;
  box-sizing:border-box; width:100%; max-width:780px!important; min-height:470px; margin:0 auto; padding:12px;
  background:#fbf5e6; border-radius:18px;
  box-shadow:inset 0 0 0 1px #e3d4b0,inset 0 0 0 7px #fbf5e6,inset 0 0 0 8px #d9c08a66,0 3px 0 #d8c29a,0 30px 60px #031a1c80;
  animation:paper-login-open .7s cubic-bezier(.2,.8,.25,1) both;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView:not(#feika-none)::after {
  content:""; position:absolute; top:12px; bottom:12px; left:50%; width:28px; translate:-50% 0; pointer-events:none;
  background:linear-gradient(90deg,#0000,#5b4a2e14 45%,#5b4a2e24 50%,#5b4a2e14 55%,#0000);
}

/* Left page: the illustration. Headline text is not shown. */
:root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-flow:first-child {
  position:relative; display:block!important; min-height:0; margin:0; padding:0; overflow:hidden; border-radius:12px 6px 6px 12px;
  background:#f6eedb url('/static/media/ui/paper-adventure/store-landscape.png') 50% 100%/auto 100% no-repeat!important;
  box-shadow:inset 0 0 0 1px #5b4a2e26;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-flow:first-child>* { display:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-flow:first-child::after {
  /* Wordmark sits in the open sky above the hills. */
  content:"FEIKA"; position:absolute; left:0; right:0; top:34%; padding-bottom:16px; text-align:center; color:#1f4f4d;
  font:800 40px/1 Georgia,"Times New Roman",serif; letter-spacing:.2em; text-shadow:0 1px 0 #fff8e5aa;
  background:linear-gradient(#c9a45a,#c9a45a) center bottom/48px 2px no-repeat;
}

/* Right page: greeting, switch, form. */
:root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-card:not(#feika-none) {
  margin:0; background:transparent!important; border:0!important; border-radius:0!important; border-image:none!important; box-shadow:none!important; filter:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-card>.ui-card-body { display:flex; flex-direction:column; justify-content:center; gap:16px; height:100%; box-sizing:border-box; padding:30px 30px 26px 40px; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-card>.ui-card-body::before {
  content:"欢迎回来"; display:block; margin:0 0 2px; color:var(--paper-ink); font:700 26px/1.25 Georgia,"Noto Serif SC","Songti SC","SimSun",serif;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView:has(#registerTab.active)>.ui-card>.ui-card-body::before { content:"创建新账号"; }
:root[data-platform-theme=paper-adventure][lang^=en] body.feika-account #authView>.ui-card>.ui-card-body::before,
:root[data-platform-theme=paper-adventure] body.feika-account:lang(en) #authView>.ui-card>.ui-card-body::before { content:"Welcome back"; }
:root[data-platform-theme=paper-adventure] body.feika-account:lang(en) #authView:has(#registerTab.active)>.ui-card>.ui-card-body::before { content:"Create an account"; }

:root[data-platform-theme=paper-adventure] body.feika-account #authView .ui-tablist:not(#feika-none) {
  display:grid; grid-template-columns:1fr 1fr; gap:3px; padding:3px; min-height:0;
  background:#efe3c6!important; border:1px solid #dccca6!important; border-radius:12px!important; border-image:none!important; box-shadow:inset 0 1px 2px #5b4a2e1a!important;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView .ui-tablist>button:not(#feika-none) {
  min-height:38px; height:38px; color:var(--paper-muted)!important; font-weight:700; font-size:14px;
  background:transparent!important; border:0!important; border-radius:9px!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView .ui-tablist>button:hover:not(.active):not(#feika-none) { color:var(--paper-ink)!important; background:#205c5b14!important; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView .ui-tablist>button.active:not(#feika-none) { color:#fff8e5!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView .ui-tablist>button::after { display:none!important; }

:root[data-platform-theme=paper-adventure] body.feika-account #authView form { gap:12px; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView .ui-field { gap:5px; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView .ui-field-label { color:var(--paper-ink)!important; font-size:13px; font-weight:700; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView form input:not([type=checkbox]):not([type=radio]):not(#feika-none) {
  height:44px; min-height:44px; padding:0 14px 0 42px!important; color:var(--paper-ink)!important; font-size:14px;
  border-image:url('/static/media/ui/paper-adventure/input-tex.webp') 16 / 6px / 0 stretch!important;
  background:#f6f2e8 var(--paper-field-icon,none) 14px center/18px no-repeat!important; transition:background-color .15s;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView form input:focus:not(#feika-none) { border-image:url('/static/media/ui/paper-adventure/input-tex-hover.webp') 16 / 6px / 0 stretch!important; background-color:#fffcf4!important; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView form input[type=email] {
  --paper-field-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6450' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3.5 6.5 8.5 6.5 8.5-6.5'/%3E%3C/svg%3E");
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView form input[type=password] {
  --paper-field-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6450' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView form input:is([type=text],:not([type])) {
  --paper-field-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6450' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20.5a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E");
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView form .ui-actions { margin-top:8px; }
:root[data-platform-theme=paper-adventure] body.feika-account #authView form button[type=submit]:not(#feika-none) {
  width:100%; min-height:46px; height:46px; font-size:16px; letter-spacing:.12em; transition:translate .15s,filter .15s;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView form button[type=submit]:hover:not(:disabled):not(#feika-none) { translate:0 -1px; filter:brightness(1.06); }
:root[data-platform-theme=paper-adventure] body.feika-account #authView #authMessage:not(:empty):not(#feika-none) {
  margin:0; padding:8px 12px; color:#8a2f28!important; font-size:12.5px; background:#f6e1d9!important;
  border:0!important; border-left:3px solid #b8433a!important; border-radius:8px!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-account #authView #authMessage:empty { display:none; }

@keyframes paper-login-open { from { opacity:0; translate:0 16px; scale:.98; } }
@media(max-width:700px) {
  :root[data-platform-theme=paper-adventure] body.feika-account #authView:not(#feika-none) { grid-template-columns:1fr; max-width:420px!important; min-height:0; }
  :root[data-platform-theme=paper-adventure] body.feika-account #authView:not(#feika-none)::after { display:none; }
  :root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-flow:first-child { height:150px; border-radius:12px; }
  :root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-flow:first-child::after { top:26%; font-size:30px; }
  :root[data-platform-theme=paper-adventure] body.feika-account #authView>.ui-card>.ui-card-body { padding:22px 18px 16px; }
}
@media(prefers-reduced-motion:reduce) {
  :root[data-platform-theme=paper-adventure] body.feika-account #authView:not(#feika-none) { animation:none; }
}

/* ===== Publishing editor (workbench pane and package upload) =====
   Sections are flat regions on the paper split by dashed gold rules; primary actions are the
   teal bevel, everything else a cream chip sized to its label. Previews and logs sit in warm
   insets instead of black boxes. */
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView {
  --pub-rule:#d6c39a; --pub-inset:#f3ead3; --pub-inset-line:#d8c8a2;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.fine,.muted,.dev-pane-hint,.ui-field-hint,.ui-hint):not(#feika-none) { color:var(--paper-muted)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .dev-pane h3:not(#feika-none) {
  margin:0; color:var(--paper-ink)!important; font:700 17px/1.35 Georgia,"Noto Serif SC","Songti SC","SimSun",serif;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .dev-pane>.dev-pane-hint { margin-bottom:6px; font-size:13px; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.publication-section,.publication-media-card,.publication-gallery-card,.publication-release-summary,.publication-release-footer,.ui-fieldset):not(#feika-none) {
  border-color:var(--pub-rule)!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.publication-gallery-card,.publication-release-footer):not(#feika-none) { border-top-style:dashed!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .publication-release-summary:not(#feika-none) { border-top:1px dashed var(--pub-rule)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView hr { border:0; border-top:1px dashed var(--pub-rule); }

/* Buttons: sized to their labels; primary teal, secondary cream, destructive red ink. */
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.toolbar,.ui-actions,.dev-publish-actions):not(#feika-none) { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.toolbar,.ui-actions,.dev-publish-actions)>button.ui-control:not(#feika-none) { flex:0 0 auto; width:auto; min-width:112px; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control:not([role=tab]):not(.icon):not(#feika-none) { min-height:40px; height:40px; padding:0 18px!important; font-weight:600; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control.primary:not([role=tab]):not(:disabled):not(#feika-none) {
  color:#fff8e5!important; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important; filter:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control.primary:not([role=tab]):hover:not(:disabled):not(#feika-none) { border-image:var(--paper-btn-face-hover)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control:not(.primary):not([role=tab]):not(.icon):not(#feika-none) {
  color:var(--paper-ink)!important; background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important; filter:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control:not(.primary):not([role=tab]):not(.icon):hover:not(:disabled):not(#feika-none) { border-image:var(--paper-chip-face-hover)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control.error:not(#feika-none) { color:#a3382f!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control:disabled:not(#feika-none) { opacity:.55; }

/* Save bar: pinned to the pane's foot, primary first. */
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .dev-actionbar:not(#feika-none) {
  position:sticky; bottom:0; z-index:3; display:flex; align-items:center; gap:12px; margin-top:18px; padding:12px 0!important;
  background:#f6eedb!important; border:0!important; border-top:1px solid var(--pub-rule)!important; border-image:none!important; box-shadow:0 -8px 14px -10px #5b4a2e33!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .dev-actionbar>.fine { font-size:12px; }

/* Dropdowns: unfilled frame over cream so the chevron shows. */
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView select:not([multiple]):not(#feika-none) {
  height:40px; min-height:40px; padding:0 34px 0 12px!important; appearance:none; color:var(--paper-ink)!important;
  border:0!important; border-radius:0!important; border-image:url('/static/media/ui/paper-adventure/input-tex.webp') 16 / 6px / 0 stretch!important; box-shadow:none!important;
  background:#f3f0e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23173c3e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center/14px no-repeat!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file])):not(#feika-none) { height:40px; min-height:40px; }

/* Media: warm mats with a dashed edge; the file picker is a chip plus the file name. */
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .dev-img-preview:not(#feika-none) {
  color:var(--paper-muted)!important; background:var(--pub-inset) repeating-linear-gradient(135deg,#0000 0 12px,#5b4a2e08 12px 24px)!important;
  border:1px dashed var(--pub-inset-line)!important; border-radius:12px!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .dev-img-preview img { border-radius:11px; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView input[type=file]:not(#feika-none) {
  height:auto; min-height:0; padding:6px 10px 6px 6px!important; color:var(--paper-muted)!important; font-size:13px;
  background:transparent!important; border:1px dashed var(--pub-inset-line)!important; border-radius:10px!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView input[type=file]::file-selector-button {
  height:32px; margin-right:12px; padding:0 14px; color:var(--paper-ink); font:600 13px "Microsoft YaHei UI",sans-serif; cursor:pointer;
  background:#fbf5e6; border:1px solid #d8c8a2; border-radius:8px; box-shadow:0 1px 2px #5b4a2e1a;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView input[type=file]:hover::file-selector-button { background:#fffaf0; border-color:#b9a77e; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.publication-gallery-empty,.dev-media-empty,.media-dropzone,[class*=gallery-empty]):not(#feika-none) {
  color:var(--paper-muted)!important; background:var(--pub-inset)!important; border:1px dashed var(--pub-inset-line)!important; border-radius:12px!important;
}

/* Logs and status. */
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(pre.bridge-log,.ui-log):not(#feika-none) {
  min-height:0; padding:10px 12px!important; color:var(--paper-muted)!important; font:12px/1.6 Consolas,"Microsoft YaHei UI",monospace;
  background:var(--pub-inset)!important; border:1px dashed var(--pub-inset-line)!important; border-radius:10px!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView pre.bridge-log:empty { display:none; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .ui-counter.warn:not(#feika-none) {
  justify-content:center; min-height:34px; padding:6px 12px!important; color:#7a5310!important; font-weight:600;
  background:#f6e7c4!important; border:1px solid #e4c98a!important; border-radius:10px!important; border-image:none!important; box-shadow:none!important;
}

/* Checkboxes: each is a pill; a ticked one is tinted teal. */
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView label.ui-checkbox-field:not(#feika-none) {
  display:inline-flex; align-items:center; gap:8px; min-height:34px; padding:0 14px 0 10px; color:var(--paper-ink); font-size:13px; cursor:pointer;
  background:#fbf5e6; border:1px solid #dccca6; border-radius:999px; transition:background-color .15s,border-color .15s;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView label.ui-checkbox-field:hover { border-color:#b9a77e; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView label.ui-checkbox-field:has(input:checked) { background:#dbe8e2; border-color:#8fb3a8; color:#173c3e; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView input[type=checkbox] { accent-color:#1f4f4d; width:16px; height:16px; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .ui-fieldset:not(#feika-none) { padding:14px 0 0; border:0!important; border-top:1px dashed var(--pub-rule)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.ui-checkbox-grid,.ui-checkbox-list,.backend-permission-grid):not(#feika-none) { display:flex; flex-wrap:wrap; gap:8px; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView :is(.dev-media-status,.publication-gallery-placeholder p,.publication-gallery-placeholder svg):not(#feika-none) { color:var(--paper-muted)!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView .publication-gallery-placeholder:not(#feika-none) {
  background:var(--pub-inset) repeating-linear-gradient(135deg,#0000 0 12px,#5b4a2e08 12px 24px)!important; border:1px dashed var(--pub-inset-line)!important; border-radius:12px!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control.primary:not([role=tab]):disabled:not(#feika-none) {
  color:#fff8e5!important; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important; opacity:.5; filter:saturate(.6)!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView button.ui-control.error:not(.primary):not([role=tab]):not(.icon):not(#feika-none) { color:#a3382f!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView fieldset.ui-fieldset:not(#feika-none) { margin-top:8px; padding:0!important; border:0!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView fieldset.ui-fieldset>legend {
  float:left; width:100%; margin:6px 0 4px; padding:14px 0 0; border-top:1px dashed var(--pub-rule); color:var(--paper-ink); font:700 15px/1.35 Georgia,"Noto Serif SC","SimSun",serif;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView fieldset.ui-fieldset>legend+* { clear:both; }

/* ===== Data save system (items, records, grants) =====
   A calm ledger: serif title, a tab band, and clean cream cards with ruled headers. */
:root[data-platform-theme=paper-adventure] body.feika-data:not(#feika-none) { background:#f6eedb var(--paper-ivory) center/720px repeat!important; }
:root[data-platform-theme=paper-adventure] body.feika-data>main:not(#feika-none) { max-width:1240px; margin:0 auto; padding:28px 28px 40px!important; background:transparent!important; box-shadow:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-data>main>header { align-items:flex-end; padding-bottom:16px; border-bottom:1px dashed #d6c39a; }
:root[data-platform-theme=paper-adventure] body.feika-data>main>header h1 { margin:0; color:var(--paper-ink); font:700 28px/1.2 Georgia,"Noto Serif SC","Songti SC","SimSun",serif; }
:root[data-platform-theme=paper-adventure] body.feika-data>main>header p { margin-top:6px; color:var(--paper-muted)!important; font-size:13px; }
:root[data-platform-theme=paper-adventure] body.feika-data>main>header a.ui-control:not(#feika-none) {
  min-height:36px; height:36px; padding:0 14px!important; color:var(--paper-ink)!important; text-decoration:none!important; font-weight:600;
  background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data #data-tabs:not(#feika-none) {
  display:inline-flex; gap:2px; width:max-content; margin:18px 0 16px; padding:3px;
  background:#efe3c6!important; border:1px solid #dccca6!important; border-radius:10px!important; border-image:none!important; box-shadow:inset 0 1px 2px #5b4a2e1a!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data #data-tabs>button:not(#feika-none) {
  min-height:34px; height:34px; padding:0 18px!important; color:var(--paper-muted)!important; font-weight:700;
  background:transparent!important; border:0!important; border-radius:7px!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data #data-tabs>button:hover:not([aria-selected=true]):not(#feika-none) { color:var(--paper-ink)!important; background:#205c5b14!important; }
:root[data-platform-theme=paper-adventure] body.feika-data #data-tabs>button[aria-selected=true]:not(#feika-none) { color:#fff8e5!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; }
:root[data-platform-theme=paper-adventure] body.feika-data #data-tabs>button::after { display:none!important; }

:root[data-platform-theme=paper-adventure] body.feika-data #status:not(:empty):not(#feika-none) {
  margin:0 0 14px; padding:10px 14px; color:#7a3a1e!important; font-size:13px; background:#f8e6d6!important;
  border:1px solid #ecc9ad!important; border-left:3px solid #c0703a!important; border-radius:10px!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .columns { gap:18px; }
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card:not(#feika-none) {
  background:#fbf5e6!important; border:1px solid #e1d3b1!important; border-radius:14px!important; border-image:none!important;
  box-shadow:0 1px 3px #5b4a2e14,0 10px 24px -14px #5b4a2e40!important; filter:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card-body { padding:18px 20px 20px!important; gap:14px; }
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card-title:not(#feika-none) {
  margin:0 -20px 2px; padding:0 20px 12px; color:var(--paper-ink); border-bottom:1px solid #e8dcbf;
  font:700 17px/1.3 Georgia,"Noto Serif SC","SimSun",serif;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ui-field-label { color:var(--paper-ink)!important; font-size:13px; font-weight:700; }
:root[data-platform-theme=paper-adventure] body.feika-data :is(input:not([type=checkbox]):not([type=radio])):not(#feika-none) { height:40px; min-height:40px; }
:root[data-platform-theme=paper-adventure] body.feika-data textarea.ui-code-input,
:root[data-platform-theme=paper-adventure] body.feika-data pre.ui-code { font:12.5px/1.6 Consolas,monospace!important; }
:root[data-platform-theme=paper-adventure] body.feika-data pre.ui-code:not(#feika-none) {
  padding:10px 12px; color:var(--paper-muted)!important; background:#f3ead3!important; border:1px dashed #d8c8a2!important; border-radius:10px!important; border-image:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ui-actions:not(#feika-none) { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
:root[data-platform-theme=paper-adventure] body.feika-data .ui-actions>button.ui-control:not(#feika-none) { flex:0 0 auto; width:auto; min-width:96px; height:40px; min-height:40px; padding:0 18px!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .ui-actions>button.ui-control:not(.primary):not(#feika-none) {
  color:var(--paper-ink)!important; background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ui-actions>button.ui-control:not(.primary):hover:not(:disabled):not(#feika-none) { border-image:var(--paper-chip-face-hover)!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .ui-actions>button.primary:not(#feika-none) { min-width:140px; }
:root[data-platform-theme=paper-adventure] body.feika-data #record-list:not(#feika-none) { background:transparent!important; border:0!important; border-image:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-data #record-list .ui-state { padding:22px 10px; color:var(--paper-muted); background:#f3ead3; border:1px dashed #d8c8a2; border-radius:10px; }
:root[data-platform-theme=paper-adventure] body.feika-data details>summary.ui-disclosure:not(#feika-none) {
  min-height:0; padding:8px 0; color:var(--paper-muted)!important; font-size:13px; background:transparent!important; border:0!important; border-top:1px dashed #d6c39a!important; border-radius:0!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card-body>button.ui-control:not(#feika-none) {
  align-self:flex-start; width:auto; min-width:112px; height:40px; min-height:40px; padding:0 18px!important; color:var(--paper-ink)!important;
  background-color:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-chip-face)!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card-body>button.ui-control:hover:not(:disabled):not(#feika-none) { border-image:var(--paper-chip-face-hover)!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card-body>.ui-state:not(#feika-none) { padding:22px 10px; color:var(--paper-muted); background:#f3ead3; border:1px dashed #d8c8a2; border-radius:10px; }
/* Package store panels: the same clean cream cards as the other package pages. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#featuredCarousel,.ui-feature-list,#homeRankSection .rank-board):not(#feika-none) {
  background:#fbf5e6!important; border:1px solid #e1d3b1!important; border-radius:14px!important; border-image:none!important;
  box-shadow:0 1px 3px #5b4a2e14,0 12px 26px -16px #5b4a2e4d!important; filter:none!important; overflow:hidden;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#featuredCarousel,.ui-feature-list,#homeRankSection .rank-board):not(#feika-none)::before,
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform :is(#featuredCarousel,.ui-feature-list,#homeRankSection .rank-board):not(#feika-none)::after { display:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #homeRankPreview:not(#feika-none) { background:transparent!important; border:0!important; border-left:1px solid #e1d3b1!important; border-image:none!important; box-shadow:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #featuredArt:not(#feika-none) { border:0!important; border-image:none!important; }

/* ===== One sheet, two panes =====
   Upload page and data records: the list and the editor are one paper sheet. The list is a
   tinted rail on the left, the editor fills the rest; a single hairline divides them. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell:not(#feika-none) {
  display:grid; grid-template-columns:270px minmax(0,1fr); gap:0!important; align-items:stretch; overflow:hidden;
  background:#fbf5e6; border:1px solid #e1d3b1; border-radius:16px; box-shadow:0 1px 3px #5b4a2e14,0 14px 30px -18px #5b4a2e55;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell>.dev-sidebar:not(#feika-none) {
  position:static; width:auto; margin:0; background:#f2e8d0!important; border:0!important; border-right:1px solid #e1d3b1!important;
  border-radius:0!important; box-shadow:none!important; overflow:visible;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell>.dev-sidebar>.panel-head:not(#feika-none) {
  padding:20px 18px 12px!important; border-bottom:0!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-sidebar>.panel-head h2 { font:700 17px/1.3 Georgia,"Noto Serif SC","SimSun",serif; color:var(--paper-ink); }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-sidebar>.panel-head .fine { font-size:12px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-sidebar>.panel-body { padding:0 10px 14px!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #developerGameList .ui-state:not(#feika-none) {
  display:grid; justify-items:center; gap:8px; margin:4px 4px 0; padding:18px 14px; text-align:center;
  background:transparent!important; border:1px dashed #d3bf93!important; border-radius:12px!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #developerGameList .ui-state-title { font:700 15px/1.3 Georgia,"Noto Serif SC","SimSun",serif; color:var(--paper-ink); }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #developerGameList .ui-state-message { font-size:12.5px; line-height:1.6; color:var(--paper-muted); }
/* List rows: the chosen package is a lighter sheet with a teal edge. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #developerGameList>:is(button,[role=button],.dev-game-item):not(.ui-state):not(#feika-none) {
  width:100%; margin:0 0 4px; padding:10px 12px!important; text-align:left; color:var(--paper-ink)!important;
  background:transparent!important; border:0!important; border-radius:10px!important; border-image:none!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #developerGameList>:is(button,[role=button],.dev-game-item):hover:not(#feika-none) { background:#205c5b12!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #developerGameList>:is(.active,[aria-pressed=true],[aria-selected=true]):not(#feika-none) {
  background:#fbf5e6!important; box-shadow:inset 3px 0 0 #1f4f4d,0 1px 3px #5b4a2e1f!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell>.dev-main-col { min-width:0; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell .dev-workspace:not(#feika-none) {
  background:transparent!important; border:0!important; border-radius:0!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell .dev-actionbar:not(#feika-none) { background:#fbf5e6!important; }
@media(max-width:900px) {
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell:not(#feika-none) { grid-template-columns:1fr; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell>.dev-sidebar:not(#feika-none) { border-right:0!important; border-bottom:1px solid #e1d3b1!important; }
}

/* Data records, rules and grants: the same split sheet. */
:root[data-platform-theme=paper-adventure] body.feika-data .columns:not(#feika-none) {
  gap:0!important; align-items:stretch!important; overflow:hidden;
  background:#fbf5e6; border:1px solid #e1d3b1; border-radius:16px; box-shadow:0 1px 3px #5b4a2e14,0 14px 30px -18px #5b4a2e55;
}
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:not(#feika-none) {
  margin:0; background:transparent!important; border:0!important; border-radius:0!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child:not(#feika-none) { background:#f2e8d0!important; border-right:1px solid #e1d3b1!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card .ui-card-body { padding:20px 22px 22px!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card .ui-card-title:not(#feika-none) { margin:0 0 2px; padding:0; border-bottom:0; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:last-child .ui-card-title:not(#feika-none) { margin:0 -22px 4px; padding:0 22px 14px; border-bottom:1px solid #e8dcbf; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child .ui-card-body>p { font-size:12.5px; line-height:1.6; color:var(--paper-muted)!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child :is(#record-list .ui-state,.ui-card-body>.ui-state):not(#feika-none) { background:transparent; border-color:#d3bf93; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child .ui-actions:not(#feika-none) { justify-content:flex-start; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child .ui-actions>button.ui-control:not(#feika-none) { flex:1 1 0; min-width:0; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child .ui-card-body>button.ui-control:not(#feika-none) { align-self:stretch; }
@media(max-width:760px) {
  :root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child:not(#feika-none) { border-right:0!important; border-bottom:1px solid #e1d3b1!important; }
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell .dev-workspace-head:not(#feika-none) { padding:22px 28px 0!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell .dev-workspace-body:not(#feika-none) { padding:0 28px 0!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView .dev-shell .dev-pane:not(#feika-none) { padding:16px 0 0!important; }

/* ===== Package upload: a gallery of packages, then each package's own settings page ===== */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView:is(.mobile-dev-list-screen,.mobile-dev-editor-screen) .dev-shell:not(#feika-none) {
  display:block; background:transparent; border:0; border-radius:0; box-shadow:none; overflow:visible;
}
/* Gallery. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-main-col { display:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-sidebar:not(#feika-none) {
  display:block; background:transparent!important; border:0!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-sidebar>.panel-head:not(#feika-none) {
  display:flex; align-items:baseline; gap:12px; padding:0 2px 14px!important; background:transparent!important; border:0!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-sidebar>.panel-head h2 { font-size:20px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-sidebar>.panel-body { padding:0!important; max-height:none; overflow:visible; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList:not(#feika-none) {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; max-height:none; overflow:visible;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item:not(#feika-none) {
  position:relative; display:flex; flex-direction:column; gap:8px; min-height:170px; margin:0; padding:20px 20px 18px 20px!important; text-align:left;
  color:var(--paper-ink)!important; background:#fbf5e6!important; border:1px solid #e1d3b1!important; border-radius:16px!important; border-image:none!important;
  box-shadow:0 1px 3px #5b4a2e14,0 12px 24px -18px #5b4a2e66!important; cursor:pointer; transition:translate .2s cubic-bezier(.34,1.4,.64,1),box-shadow .2s,border-color .2s;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item:hover:not(#feika-none) {
  translate:0 -3px; border-color:#cdb98d!important; box-shadow:0 2px 4px #5b4a2e1a,0 18px 30px -16px #5b4a2e70!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item::before {
  content:""; width:40px; height:40px; margin-bottom:4px; border-radius:12px; background:#1f4f4d;
  -webkit-mask:none; box-shadow:inset 0 0 0 1px #ffffff1f;
  background:#1f4f4d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3d58a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3.5 7.5v9L12 21l8.5-4.5v-9Z'/%3E%3Cpath d='M3.5 7.5 12 12l8.5-4.5M12 12v9'/%3E%3C/svg%3E") center/22px no-repeat;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-game-item .card-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-game-item h3 { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:700 17px/1.3 Georgia,"Noto Serif SC","SimSun",serif; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-game-item .fine { font-size:12px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-game-item .muted {
  display:-webkit-box; margin:0; overflow:hidden; font-size:13px; line-height:1.55; -webkit-box-orient:vertical; -webkit-line-clamp:2;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-game-item .dev-game-tags { display:flex; flex-wrap:wrap; gap:5px; margin-top:auto; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList .ui-state:not(#feika-none) {
  grid-column:1/-1; display:grid; justify-items:center; gap:10px; margin:0; padding:196px 24px 40px; text-align:center;
  background:#fbf5e6 var(--paper-empty-inventory) center 30px/150px auto no-repeat!important; border:1px solid #e1d3b1!important; border-radius:16px!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList .ui-state-title { font-size:18px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList .ui-state-message { max-width:420px; }

/* Settings page: back link and title on top, a vertical section list beside one sheet. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen :is(.developer-page-toolbar,.dev-sidebar,.mobile-dev-selected-title) { display:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen .mobile-dev-editor-back:not(#feika-none) {
  display:inline-flex; align-items:center; gap:6px; width:auto; min-width:0; height:34px; min-height:0; margin:0 0 14px; padding:0 14px 0 10px!important;
  color:var(--paper-muted)!important; font-weight:600; background:transparent!important; border:0!important; border-radius:999px!important; border-image:none!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen .mobile-dev-editor-back::before { content:"←"; font-size:16px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen .mobile-dev-editor-back:hover:not(#feika-none) { color:var(--paper-ink)!important; background:#205c5b14!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerWorkspace:not(#feika-none) {
  display:grid; grid-template-columns:200px minmax(0,1fr); column-gap:28px; align-items:start;
  background:transparent!important; border:0!important; border-radius:0!important; box-shadow:none!important; overflow:visible;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen .dev-workspace-head:not(#feika-none) { display:contents; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #packageEditorContext { grid-column:1/-1; margin:0 0 22px; padding:0 0 18px; border-bottom:1px dashed #d6c39a; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #packageEditorName { font-size:28px!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerTabNav:not(#feika-none) {
  grid-column:1; position:sticky; top:12px; display:flex; flex-direction:column; gap:2px; width:auto; margin:0!important; padding:0!important; overflow:visible;
  background:transparent!important; border:0!important; border-radius:0!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerTabNav>button.ui-control:not(.hide):not(#feika-none):not(#feika-none) {
  display:flex; justify-content:flex-start; width:100%; height:42px; min-height:0; padding:0 14px!important; color:var(--paper-muted)!important; font-size:14px; font-weight:600;
  background:transparent!important; border:0!important; border-radius:10px!important; border-image:none!important; box-shadow:none!important; animation:none;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerTabNav>button.ui-control:hover:not([aria-selected=true]):not(#feika-none):not(#feika-none) { color:var(--paper-ink)!important; background:#205c5b12!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerTabNav>button.ui-control[aria-selected=true]:not(#feika-none):not(#feika-none) {
  color:var(--paper-ink)!important; background:#fbf5e6!important; box-shadow:inset 3px 0 0 #1f4f4d,0 1px 3px #5b4a2e1f!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen .dev-workspace-body:not(#feika-none) {
  grid-column:2; padding:6px 30px 0!important; background:#fbf5e6!important; border:1px solid #e1d3b1!important; border-radius:16px!important;
  box-shadow:0 1px 3px #5b4a2e14,0 14px 30px -18px #5b4a2e55!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen .dev-actionbar:not(#feika-none) { margin:18px -30px 0; padding:14px 30px!important; border-radius:0 0 16px 16px; background:#fbf5e6!important; }
@media(max-width:900px) {
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerWorkspace:not(#feika-none) { grid-template-columns:minmax(0,1fr); }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerTabNav:not(#feika-none) { position:static; flex-direction:row; flex-wrap:wrap; margin-bottom:14px!important; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerTabNav>button.ui-control:not(.hide):not(#feika-none):not(#feika-none) { width:auto; }
  html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen .dev-workspace-body:not(#feika-none) { grid-column:1; }
}

/* ===== Data save system: lists fill the page, the editor is a drawer ===== */
:root[data-platform-theme=paper-adventure] body.feika-data .columns:not(#feika-none) {
  display:block!important; background:transparent; border:0; border-radius:0; box-shadow:none; overflow:visible;
}
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child:not(#feika-none) {
  background:#fbf5e6!important; border:1px solid #e1d3b1!important; border-radius:16px!important; box-shadow:0 1px 3px #5b4a2e14,0 14px 30px -18px #5b4a2e55!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body:not(#feika-none) {
  display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; column-gap:10px; row-gap:12px; padding:22px 24px 24px!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body>* { grid-column:1/-1; min-width:0; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body>.ui-card-title:not(#feika-none) { grid-column:1; grid-row:1; font-size:20px; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body>:is(.ui-actions,#new-policy):not(#feika-none) { grid-column:2/-1; grid-row:1; margin:0; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body>#refresh-grants:not(#feika-none) { grid-column:2; grid-row:1; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body>.ds-open-editor:not(#feika-none) { display:inline-flex; grid-column:3; grid-row:1; }
:root[data-platform-theme=paper-adventure] body.feika-data #new-record:not(#feika-none),
:root[data-platform-theme=paper-adventure] body.feika-data #new-policy:not(#feika-none),
:root[data-platform-theme=paper-adventure] body.feika-data .ds-open-editor:not(#feika-none) {
  width:auto; min-width:112px; height:40px; min-height:40px; padding:0 18px!important; color:#fff8e5!important; font-weight:700;
  background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important; align-self:center;
}
:root[data-platform-theme=paper-adventure] body.feika-data :is(#new-record,#new-policy,.ds-open-editor):hover:not(#feika-none) { border-image:var(--paper-btn-face-hover)!important; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field:not(#feika-none) {
  display:grid; grid-auto-flow:column; grid-template-rows:auto auto; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:14px; row-gap:6px; padding:14px 16px;
  background:#f3ead3; border:1px solid #e6d8b6; border-radius:12px;
}
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body>:is(p.ui-body-text,.ui-meta) { margin:0; font-size:13px; color:var(--paper-muted)!important; }
/* Rows. */
:root[data-platform-theme=paper-adventure] body.feika-data :is(#record-list,#policy-list):not(#feika-none) { display:flex; flex-direction:column; gap:0; max-height:none; padding:0; border-top:1px solid #e8dcbf!important; }
:root[data-platform-theme=paper-adventure] body.feika-data :is(#record-list,#policy-list)>button.ui-control:not(#feika-none) {
  display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; min-height:56px; height:auto; padding:10px 14px!important; text-align:left;
  color:var(--paper-ink)!important; background:transparent!important; border:0!important; border-bottom:1px solid #efe4c9!important; border-radius:0!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data :is(#record-list,#policy-list)>button.ui-control:hover:not(#feika-none) { background:#205c5b0d!important; }
:root[data-platform-theme=paper-adventure] body.feika-data :is(#record-list,#policy-list)>button.ui-control[aria-pressed=true]:not(#feika-none) { background:#f3ead3!important; box-shadow:inset 3px 0 0 #1f4f4d!important; }
:root[data-platform-theme=paper-adventure] body.feika-data :is(#record-list,#policy-list)>.ui-state:not(#feika-none),
:root[data-platform-theme=paper-adventure] body.feika-data #grant-list>.ui-state:not(#feika-none) {
  margin-top:6px; padding:36px 16px; text-align:center; color:var(--paper-muted); background:transparent; border:1px dashed #d8c8a2; border-radius:12px;
}
/* Drawer. */
:root[data-platform-theme=paper-adventure] body.feika-data .columns:not(.ds-editing)>.ds-drawer { display:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns.ds-editing>.ds-drawer:not(#feika-none) {
  position:fixed; z-index:60; top:0; right:0; bottom:0; width:min(560px,94vw); margin:0; overflow:auto;
  background:#fbf5e6!important; border:0!important; border-left:1px solid #e1d3b1!important; border-radius:18px 0 0 18px!important;
  box-shadow:-24px 0 48px -20px #24363a66!important; animation:ds-drawer-in .28s cubic-bezier(.2,.8,.25,1);
}
:root[data-platform-theme=paper-adventure] body.feika-data .ds-drawer>.ui-card-body { position:relative; padding:26px 28px 30px!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .ds-drawer .ui-card-title:not(#feika-none) { margin:0 -28px 6px!important; padding:0 64px 16px 28px!important; font-size:20px; border-bottom:1px solid #e8dcbf!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .ds-drawer .ds-drawer-close:not(#feika-none) {
  position:absolute; top:18px; right:20px; display:grid; place-items:center; width:34px; height:34px; min-height:0; padding:0!important;
  color:var(--paper-muted)!important; font-size:20px; background:transparent!important; border:0!important; border-radius:50%!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ds-drawer .ds-drawer-close:hover:not(#feika-none) { color:var(--paper-ink)!important; background:#205c5b14!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns.ds-editing>.ds-drawer-scrim { display:block; position:fixed; inset:0; z-index:59; background:#24363a40; animation:ds-fade .2s ease; }
@keyframes ds-drawer-in { from { translate:40px 0; opacity:.4; } }
@keyframes ds-fade { from { opacity:0; } }
/* Data page fixes: hidden tab panels stay hidden; the filter pair sits side by side. */
:root[data-platform-theme=paper-adventure] body.feika-data .columns[hidden]:not(#feika-none) { display:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field:not(#feika-none) { grid-auto-flow:row; grid-template-rows:none; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field>label[for=owner] { grid-column:1; grid-row:1; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field>#owner { grid-column:1; grid-row:2; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field>label[for=filter] { grid-column:2; grid-row:1; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field>#filter { grid-column:2; grid-row:2; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field>.ui-field:empty { display:none; }
:root[data-platform-theme=paper-adventure] body.feika-data .ds-drawer button.ds-drawer-close.ui-control:not(#feika-none) {
  position:absolute; top:18px; right:20px; display:grid; place-items:center; width:34px; min-width:0; height:34px; min-height:0; padding:0!important;
  color:var(--paper-muted)!important; font-size:20px; background:transparent!important; border:0!important; border-radius:50%!important; border-image:none!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ds-drawer button.ds-drawer-close.ui-control:hover:not(#feika-none) { color:var(--paper-ink)!important; background:#205c5b14!important; }
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field>.ui-field:not(#feika-none) { display:contents; }
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card-body>button.ds-open-editor.ui-control:not(#feika-none) {
  color:#fff8e5!important; font-weight:700; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
:root[data-platform-theme=paper-adventure] body.feika-data .ui-card-body>button.ds-open-editor.ui-control:hover:not(#feika-none) { border-image:var(--paper-btn-face-hover)!important; }

/* Package gallery cards: icon and name on top, status at the corner, a two-line pitch, tags at the foot. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item:not(#feika-none) {
  display:grid; grid-template-columns:44px minmax(0,1fr); grid-template-rows:auto auto auto 1fr; column-gap:14px; row-gap:4px; align-items:start; justify-items:stretch;
  min-height:0; padding:18px 18px 16px!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item::before { grid-column:1; grid-row:1/3; width:44px; height:44px; margin:0; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item>.card-row:not(#feika-none) { grid-column:2; grid-row:1; display:flex; align-items:center; justify-content:space-between; gap:10px; width:auto; min-width:0; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item>.card-row>h3 { min-width:0; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item>.fine:not(#feika-none) { grid-column:2; grid-row:2; margin:0; text-align:left; color:var(--paper-muted)!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item>.muted:not(#feika-none) {
  grid-column:1/-1; grid-row:3; display:-webkit-box!important; margin:10px 0 0; text-align:left; color:var(--paper-muted)!important; min-height:3.1em;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item>.dev-game-tags:not(#feika-none) { grid-column:1/-1; grid-row:4; align-self:end; justify-content:flex-start; margin-top:10px; }
/* Status pills: colour by state. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerGameList .card-row>.ui-counter:not(#feika-none) {
  flex:none; height:24px; min-height:0; padding:0 10px!important; font-size:12px; font-weight:700; border-radius:999px!important; border:1px solid #dccca6!important; background:#efe3c6!important; color:#5a4a2c!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerGameList .card-row>.ui-counter.ok:not(#feika-none) { background:#dcebe3!important; border-color:#9cc3b1!important; color:#1f5a46!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerGameList .card-row>.ui-counter:is(.warn,.pending):not(#feika-none) { background:#f6e7c4!important; border-color:#e4c98a!important; color:#7a5310!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerGameList .card-row>.ui-counter:is(.error,.danger,.bad):not(#feika-none) { background:#f6dcd6!important; border-color:#e3b0a5!important; color:#8a2f28!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerGameList .dev-game-tags>.ui-counter:not(#feika-none) {
  height:22px; min-height:0; padding:0 9px!important; font-size:11.5px; font-weight:600; color:#5a4a2c!important; background:transparent!important; border:1px dashed #d3bf93!important; border-radius:999px!important; box-shadow:none!important;
}
/* The gallery is not "selected": no pressed look on any card. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item[aria-pressed=true]:not(#feika-none) { box-shadow:0 1px 3px #5b4a2e14,0 12px 24px -18px #5b4a2e66!important; }
/* Page head on the gallery: title and the new-package button; the old two-pane hint is gone. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen>.developer-page-toolbar>.dev-page-hint { display:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen>.developer-page-toolbar:not(#feika-none)::before {
  content:"我的包"; display:block!important; flex:1 1 auto; color:var(--paper-ink); font:700 21px/1.2 Georgia,"Noto Serif SC","Songti SC","SimSun",serif;
}
html.package-platform:root[data-platform-theme=paper-adventure][lang^=en] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen>.developer-page-toolbar:not(#feika-none)::before { content:"My packages"; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-sidebar>.panel-head h2 { display:none; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen .dev-sidebar>.panel-head:not(#feika-none) { padding:0 4px 10px!important; justify-content:flex-start; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #newPackageBtn:not(#feika-none) {
  color:#fff8e5!important; font-weight:700; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #newPackageBtn:hover:not(#feika-none) { border-image:var(--paper-btn-face-hover)!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen>.developer-page-toolbar:not(#feika-none):not(#feika-none) { background:#f6ecd6!important; background-image:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-list-screen>.developer-page-toolbar:not(#feika-none):not(#feika-none)::before { position:static!important; inset:auto!important; width:auto!important; height:auto!important; background:none!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #newPackageBtn.ui-control:not(#feika-none):not(#feika-none) {
  color:#fff8e5!important; font-weight:700; background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-btn-face)!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView #newPackageBtn.ui-control:hover:not(#feika-none):not(#feika-none) { border-image:var(--paper-btn-face-hover)!important; }

/* Package update page (one flow, no section tabs): a centred sheet with numbered steps. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #developerView.mobile-dev-editor-screen #developerWorkspace:has(>#packagePublicationPage:not([hidden])):not(#feika-none) { display:block; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage:not(#feika-none) {
  counter-reset:pkg-step; display:flex; flex-direction:column; gap:14px; max-width:760px; margin:0; padding:30px 34px 32px;
  background:#fbf5e6; border:1px solid #e1d3b1; border-radius:16px; box-shadow:0 1px 3px #5b4a2e14,0 14px 30px -18px #5b4a2e55;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-card-title { margin:0; font:700 26px/1.25 Georgia,"Noto Serif SC","Songti SC","SimSun",serif; color:var(--paper-ink); }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-meta { margin:0; font-size:13px; line-height:1.65; color:var(--paper-muted)!important; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-card-title+.ui-meta { padding-bottom:16px; border-bottom:1px dashed #d6c39a; }
/* Steps: choose the package, then the scope. */
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-field { counter-increment:pkg-step; position:relative; padding-left:42px; margin-top:6px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-field::before {
  content:counter(pkg-step); position:absolute; left:0; top:0; display:grid; place-items:center; width:28px; height:28px; border-radius:50%;
  color:#fff8e5; font:700 14px/1 Georgia,serif; background:#1f4f4d;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-field>.ui-field-label { display:block; margin:3px 0 8px; font-size:15px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-field>select { width:100%; max-width:420px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-field+.ui-meta,
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-actions,
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>#packagePreparationStatus { margin-left:42px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>#packagePreparationStatus:not(:empty) {
  padding:9px 12px; color:#7a5310!important; background:#f6e7c4; border:1px solid #e4c98a; border-radius:10px;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>.ui-actions:not(#feika-none) { display:flex; flex-wrap:wrap; gap:10px; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage .ui-actions>button.ui-control:not(#feika-none) { flex:0 0 auto; width:auto; }
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationPage>details#packagePublicationAdvanced:not(#feika-none) {
  margin-top:8px; background:transparent!important; border:0!important; border-top:1px dashed #d6c39a!important; border-radius:0!important; border-image:none!important; box-shadow:none!important; filter:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationAdvanced>summary:not(#feika-none) {
  min-height:0; padding:14px 0 6px!important; color:var(--paper-ink)!important; font-weight:700;
  background:transparent!important; border:0!important; border-image:none!important; box-shadow:none!important;
}
html.package-platform:root[data-platform-theme=paper-adventure] body.feika-ui.feika-platform #packagePublicationAdvanced>.ui-card-body:not(#feika-none) { padding:8px 0 0!important; background:transparent!important; border:0!important; }

/* ===== Textured sheets =====
   The page stays flat; cards and sheets are real paper: large sheets use the parchment with teal
   corner flourishes, package cards the note with a curled corner. Outsets hide the art's margins. */
:root[data-platform-theme=paper-adventure] {
  --paper-sheet:url('/static/media/ui/paper-adventure/card-clean.webp') 60 fill / 18px / 2px stretch;
  --paper-sheet-card:url('/static/media/ui/paper-adventure/card-note.webp') 150 120 80 60 fill / 45px 36px 24px 18px / 20px 5px 11px 12px stretch;
}
:root[data-platform-theme=paper-adventure] body.feika-ui :is(
  #packagePublicationPage,
  #developerView.mobile-dev-editor-screen .dev-workspace-body,
  #developerView.mobile-dev-list-screen #developerGameList>.ui-state,
  #currentPackagesTable>.ui-state,
  .ui-feature-list,
  #homeRankSection .rank-board
):not(#feika-none):not(#feika-none),
:root[data-platform-theme=paper-adventure] body.feika-data :is(.columns>.ui-card:first-child,.columns.ds-editing>.ds-drawer):not(#feika-none):not(#feika-none) {
  background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-sheet)!important;
  box-shadow:none!important; filter:drop-shadow(0 6px 10px #5b4a2e2e);
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item:not(#feika-none):not(#feika-none) {
  background:transparent!important; border:0!important; border-radius:0!important; border-image:var(--paper-sheet-card)!important;
  box-shadow:none!important; filter:drop-shadow(0 4px 6px #5b4a2e29); padding:22px 30px 18px 20px!important;
}
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item:hover:not(#feika-none):not(#feika-none) { filter:drop-shadow(0 12px 14px #5b4a2e40); }
/* Content inside the textured sheets sits clear of the corner flourishes. */
:root[data-platform-theme=paper-adventure] body.feika-ui #packagePublicationPage:not(#feika-none) { padding:38px 44px 40px!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView.mobile-dev-editor-screen .dev-workspace-body:not(#feika-none) { padding:18px 38px 0!important; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView.mobile-dev-editor-screen .dev-actionbar:not(#feika-none) { margin:18px -38px 0!important; padding:14px 38px 24px!important; background:transparent!important; box-shadow:none!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns>.ui-card:first-child>.ui-card-body:not(#feika-none) { padding:30px 34px 32px!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .ds-drawer>.ui-card-body:not(#feika-none) { padding:34px 36px 36px!important; }
:root[data-platform-theme=paper-adventure] body.feika-data .columns.ds-editing>.ds-drawer:not(#feika-none) { top:10px; bottom:10px; right:8px; }
/* Inner wells on parchment become a light wash so the grain shows through. */
:root[data-platform-theme=paper-adventure] body.feika-data #records>.ui-card:first-child .ui-field:not(#feika-none) { background:#efe3c680; border-color:#e0cfa680; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item>.card-row:not(#feika-none):not(#feika-none) { flex-wrap:nowrap; }
:root[data-platform-theme=paper-adventure] body.feika-ui #developerView.mobile-dev-list-screen #developerGameList>.dev-game-item>.card-row>h3 { flex:1 1 auto; }

/* static/ui-components.css */
/* FEIKA shared components. ui-theme.css is the only stylesheet entry.
   Pages set dimensions; this file arranges panels, controls and feedback.
   Control faces and states are defined once in ui-controls.css. */
:root { --ui-viewport-width:var(--platform-viewport-width,100vw); --ui-viewport-height:var(--platform-viewport-height,100dvh); }
body.feika-ui.ui-layout { --ui-target-size:44px; }
body.feika-ui.ui-layout,body.feika-ui.ui-layout * { box-sizing:border-box; }
body.feika-ui.ui-action-page { margin:0; min-height:var(--ui-viewport-height); position:relative; isolation:isolate; }
body.feika-ui.ui-action-page .ui-shell { position:relative; z-index:1; width:min(var(--ui-panel-width),calc(var(--ui-viewport-width) - 24px)); min-height:var(--ui-viewport-height); margin:0 auto; padding:12px 0; display:grid; align-items:center; }
body.feika-ui .ui-panel { min-width:0; min-height:0; max-height:var(--ui-panel-max-height,calc(var(--ui-viewport-height) - 24px)); display:flex; flex-direction:column; overflow:hidden; }
body.feika-ui .ui-panel>.ui-scroll { flex:1 1 auto; }
body.feika-ui .ui-scroll { min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; scroll-padding:16px; }
body.feika-ui .ui-footer { flex:none; min-width:0; padding:var(--ui-footer-top-padding,12px) var(--ui-footer-padding,20px) var(--ui-footer-bottom-padding,16px); border-top:1px solid var(--line); }
body.feika-ui .ui-actions { display:flex; gap:10px; padding:0; margin-top:var(--ui-actions-offset,12px); }
body.feika-ui .ui-actions > .ui-control { flex:1 1 0; width:0; padding:10px 8px; line-height:1.4; white-space:normal; text-align:center; }
body.feika-ui .ui-disclosure { display:flex; align-items:center; min-height:44px; cursor:pointer; font-size:13px; }
body.feika-ui .ui-toggle { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:8px 0; color:var(--text); font-size:14px; line-height:1.5; cursor:pointer; }
body.feika-ui .ui-toggle:has(input:focus-visible) { outline:2px solid var(--brand); outline-offset:3px; }

/* Content cards and their detail readers share one text hierarchy. */
body.feika-ui .ui-card { display:flex; flex-direction:column; min-width:0; border:1px solid var(--line); border-radius:var(--radius-card); background:var(--panel); color:var(--text); overflow:hidden; }
body.feika-ui .ui-card:hover,body.feika-ui .ui-card:focus-within,body.feika-ui .ui-card[aria-current=true] { border-color:var(--brand); }
body.feika-ui .ui-card-media { display:block; width:100%; aspect-ratio:4/3; object-fit:contain; background:var(--panel-2); border-bottom:1px solid var(--line); }
body.feika-ui .ui-card-placeholder { display:grid; place-items:center; color:var(--ink-2); font-size:14px; }
body.feika-ui .ui-card-body { display:flex; flex-direction:column; flex:1; min-width:0; gap:12px; padding:12px; }
body.feika-ui .ui-card-title { min-width:0; margin:0; color:var(--text); font-size:16px; font-weight:650; line-height:1.5; overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui .ui-control.ui-card-open { text-align:start; }
body.feika-ui :is(.ui-body-text,.ui-card-summary) { min-width:0; margin:0; color:var(--ink-2); font-size:14px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
body.feika-ui .ui-card-summary { width:100%; max-height:var(--ui-card-reader-height,min(160px,calc(var(--ui-viewport-height) * .3))); }
body.feika-ui .ui-card-title.ui-scroll { max-height:var(--ui-card-reader-height,min(160px,calc(var(--ui-viewport-height) * .3))); }
body.feika-ui .ui-meta { min-width:0; margin:0; color:var(--ink-2); font-size:13px; font-style:normal; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
body.feika-ui .ui-meta.ui-scroll { max-height:var(--ui-card-reader-height,min(130px,calc(var(--ui-viewport-height) * .25))); }
body.feika-ui .ui-card-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; min-width:0; margin-top:auto; padding-top:8px; }
body.feika-ui .ui-card-actions>.ui-control { max-width:100%; }
body.feika-ui .ui-actions-stack { flex-direction:column; gap:0; }
body.feika-ui .ui-actions-stack > .ui-control { flex:none; width:100%; }
html[data-platform-theme] body.feika-ui .ui-control,html[data-platform-theme] body.feika-ui .ui-form .ui-control { min-width:0; min-height:var(--ui-target-size,44px); font-family:inherit; font-size:var(--ui-control-font-size,14px); }
html[data-platform-theme] body.feika-ui :is(button,a,summary).ui-control { display:inline-flex; align-items:center; justify-content:center; padding:var(--ui-control-padding,10px 12px); border:1px solid var(--line); border-radius:var(--radius-control); line-height:1.4; text-decoration:none; cursor:pointer; }
html[data-platform-theme] body.feika-ui .ui-control.icon { width:44px; min-width:44px; height:44px; padding:8px; font-size:12px; }
html[data-platform-theme] body.feika-ui :is(input,select,textarea).ui-control { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius-control); color:var(--text); background:var(--panel-2); }
html[data-platform-theme] body.feika-ui .ui-control[aria-invalid=true] { border-color:var(--danger); }
html[data-platform-theme] body.feika-ui input[type=file].ui-control { height:auto; }
html[data-platform-theme] body.feika-ui input.ui-control::placeholder { opacity:1; color:var(--ink-2); }
html[data-platform-theme] body.feika-ui .ui-field-label { display:block; margin-bottom:8px; color:var(--ui-label-color,var(--ink-2)); font-size:var(--ui-label-font-size,13px); font-weight:550; }
html[data-platform-theme] body.feika-ui a.ui-control.link { color:var(--text); padding:0 3px; border:0; background:none; text-decoration:underline; text-underline-offset:3px; font-size:12px; }
html[data-platform-theme] body.feika-ui.ui-layout :is(.ui-scroll,[data-ui-feedback],[tabindex]):focus-visible,
html[data-platform-theme] body.feika-ui :is(.ui-scroll,[data-ui-feedback],[data-ui-control=readout]):focus-visible { outline:2px solid var(--brand); outline-offset:2px; text-decoration:none; }
html[data-platform-theme] body.feika-ui .ui-muted { color:var(--ink-2); overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui [data-ui-feedback] { min-width:0; max-height:min(110px,calc(var(--ui-viewport-height) * .24)); overflow:auto; overscroll-behavior:contain; margin:0; padding:10px 12px; border:1px solid var(--line-strong); border-left-width:3px; border-radius:var(--radius-control); color:var(--text); background:var(--panel-2); white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; font-size:13px; }
html[data-platform-theme] body.feika-ui [data-ui-feedback]:empty { display:none; }
html[data-platform-theme] body.feika-ui [data-ui-feedback].ok { border-left-color:var(--ok); background-color:var(--success-soft); }
html[data-platform-theme] body.feika-ui [data-ui-feedback].warn { border-left-color:var(--warn); background-color:var(--warning-soft); }
html[data-platform-theme] body.feika-ui [data-ui-feedback]:is(.err,.error) { border-left-color:var(--danger); background-color:var(--danger-soft); }
body.feika-ui.ui-layout [hidden] { display:none!important; }
@media(max-width:420px) { body.feika-ui .ui-footer { padding:var(--ui-footer-top-padding,12px) var(--ui-footer-padding,16px) var(--ui-footer-bottom-padding,14px); } }

/* Native modal panels share sizing, backdrop and header geometry. */
body.feika-ui dialog.ui-dialog { position:fixed; margin:auto; padding:0; width:min(var(--ui-dialog-width,560px),calc(var(--ui-viewport-width) - 24px)); max-height:calc(var(--ui-viewport-height) - 24px); border:1px solid var(--line); border-radius:var(--radius-dialog); background:var(--panel); color:var(--text); }
body.feika-ui dialog.ui-dialog:not([open]) { display:none; }
body.feika-ui dialog.ui-dialog[data-ui-dialog-placement=end] { inset:12px 12px 12px auto; margin:0; height:calc(var(--ui-viewport-height) - 24px); }
body.feika-ui dialog.ui-dialog::backdrop { background:var(--scrim); backdrop-filter:blur(4px); }
body.feika-ui .ui-dialog-header { display:flex; align-items:center; justify-content:space-between; flex:none; gap:16px; padding:var(--ui-panel-header-padding,16px 20px); border-bottom:1px solid var(--line); }
body.feika-ui .ui-dialog-title { margin:0; min-width:0; font-size:18px; font-weight:650; overflow-wrap:anywhere; }
html:has(dialog.ui-dialog:modal),body.feika-ui:has(dialog.ui-dialog:modal) { overflow:hidden; }

/* Readable outcome text shares tone accents across feedback, logs and notices. */
body.feika-ui :is([data-ui-feedback],.ui-toast,.ui-log-entry) { --ui-status-accent:var(--brand); }
body.feika-ui :is([data-ui-feedback],.ui-toast,.ui-log-entry).ok { --ui-status-accent:var(--ok); }
body.feika-ui :is([data-ui-feedback],.ui-toast,.ui-log-entry).warn { --ui-status-accent:var(--warn); }
body.feika-ui :is([data-ui-feedback],.ui-toast,.ui-log-entry):is(.err,.error) { --ui-status-accent:var(--danger); }
html[data-platform-theme] body.feika-ui [data-ui-feedback]:is(.info,.loading) { border-left-color:var(--brand); background-color:var(--brand-soft); }
body.feika-ui .ui-log { min-width:0; border:1px solid var(--line); border-radius:var(--radius-control); padding:12px; background:var(--panel-2); color:var(--text); font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
body.feika-ui .ui-log-entry { padding:4px 8px; margin-bottom:4px; border-left:2px solid var(--ui-status-accent); border-bottom:1px solid var(--line-soft); color:var(--text); }
body.feika-ui .ui-log-entry:last-child { border-bottom:0; }
body.feika-ui .ui-notifications { position:fixed; right:16px; bottom:max(16px,env(safe-area-inset-bottom)); z-index:50; display:grid; gap:10px; width:min(360px,calc(var(--ui-viewport-width) - 32px)); max-height:calc(var(--ui-viewport-height) * .4); overflow:auto; overscroll-behavior:contain; scroll-padding:8px; }
body.feika-ui .ui-notifications:empty { display:none; }
body.feika-ui .ui-toast { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:start; gap:12px; padding:12px; border:1px solid var(--line); border-left:3px solid var(--ui-status-accent); border-radius:var(--radius-control); color:var(--text); background:var(--panel-2); box-shadow:var(--shadow-dialog); font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
body.feika-ui .ui-toast-content { max-height:min(120px,calc(var(--ui-viewport-height) * .2)); }

/* Flow surfaces and exact records share a face without modal height constraints. */
body.feika-ui .ui-surface { border:1px solid var(--line); border-radius:var(--radius-card); background:var(--panel); color:var(--text); }
body.feika-ui .ui-checkbox-field { display:flex; gap:8px; align-items:center; min-height:44px; color:var(--ink-2); font-size:var(--ui-label-font-size,13px); cursor:pointer; }
body.feika-ui .ui-checkbox-field input { flex:none; }
body.feika-ui .ui-checkbox-field>span { min-width:0; overflow-wrap:anywhere; }
body.feika-ui .ui-checkbox-field input[type=checkbox] { width:16px; height:16px; min-height:0; margin:0; padding:0; }
body.feika-ui textarea.ui-control { resize:vertical; line-height:1.65; }
html[data-platform-theme] body.feika-ui .ui-control.ui-code-input { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:13px; tab-size:2; }
body.feika-ui .ui-metric-label { display:block; color:var(--ink-2); font-size:13px; }
body.feika-ui .ui-exact-value { display:block; margin-top:6px; white-space:nowrap; font-size:24px; font-variant-numeric:tabular-nums; scrollbar-width:thin; }
body.feika-ui .ui-exact-value.ui-scroll { max-width:100%; }
body.feika-ui .ui-exact-value[data-ui-value-tone=incoming] { color:color-mix(in srgb,var(--ok) 60%,var(--text)); }
body.feika-ui .ui-badges { display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
body.feika-ui .ui-record-list>article { min-width:0; padding:16px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
body.feika-ui .ui-record-list>article:first-child { border-top:0; }
body.feika-ui .ui-record-title { font-weight:650; margin-bottom:5px; }
body.feika-ui .ui-record-path { margin:8px 0 4px; padding:12px 16px; border-left:2px solid var(--brand); color:var(--ink-2); font-size:13px; white-space:pre-line; overflow-wrap:anywhere; }
@media(max-width:420px) { body.feika-ui .ui-exact-value { font-size:20px; } }
body.feika-ui .ui-code { min-width:0; max-height:min(280px,calc(var(--ui-viewport-height) * .4)); margin:12px 0; padding:12px; border:1px solid var(--line); border-radius:var(--radius-control); background:var(--panel-2); color:var(--text); font:12px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
body.feika-ui summary.ui-disclosure { display:list-item; padding:10px 4px; line-height:1.5; }

body.feika-ui .ui-dialog-body { padding:var(--ui-panel-padding,20px); }
body.feika-ui .ui-dialog-body>.ui-dialog-title { margin-bottom:12px; }

/* A trailing clear action reserves its target width in every search field. */
html[data-platform-theme] body.feika-ui .ui-search { position:relative; min-width:0; }
html[data-platform-theme] body.feika-ui .ui-search input.ui-control { padding-right:60px; }
html[data-platform-theme] body.feika-ui .ui-search>.ui-control.icon { position:absolute; right:6px; top:0; bottom:0; margin-block:auto; z-index:3; transform:none; }

html[data-platform-theme] body.feika-ui .ui-search input[type=search]::-webkit-search-cancel-button { display:none; }
html[data-platform-theme] body.feika-ui .ui-tablist { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }

/* Theme and other preview choices use the same responsive card arrangement. */
html[data-platform-theme] body.feika-ui .ui-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; min-width:0; }
html[data-platform-theme] body.feika-ui .ui-control.ui-choice-card { justify-content:flex-start; gap:14px; text-align:left; }
body.feika-ui .ui-choice-card>span { min-width:0; }
body.feika-ui .ui-choice-title { display:block; min-width:0; font-size:16px; font-weight:650; line-height:1.5; overflow-wrap:anywhere; }
@media(max-width:760px) { html[data-platform-theme] body.feika-ui .ui-choice-grid { grid-template-columns:minmax(0,1fr); } }

/* A field and its trailing actions share one responsive row. */
html[data-platform-theme] body.feika-ui .ui-field-actions { display:grid; grid-template-columns:var(--ui-field-columns,minmax(0,1fr) auto auto); align-items:stretch; gap:8px; min-width:0; }
@media(max-width:760px) {
 html[data-platform-theme] body.feika-ui .ui-field-actions { grid-template-columns:var(--ui-field-columns,repeat(2,minmax(0,1fr))); }
 html[data-platform-theme] body.feika-ui .ui-field-actions>:is(input,select,textarea) { grid-column:var(--ui-field-span,1 / -1); }
}

/* Counters, avatars and selectable rows share a single arrangement in every theme. */
html[data-platform-theme] body.feika-ui .ui-counter { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border:1px solid currentColor; border-radius:var(--radius-control); background:transparent; color:inherit; font-size:12px; font-weight:650; line-height:1; }
body.feika-ui .ui-counter:not(.wrap) { flex:none; white-space:nowrap; }
html[data-platform-theme] body.feika-ui .ui-counter.ok { color:var(--text); border-color:var(--ok); background:var(--success-soft); }
html[data-platform-theme] body.feika-ui .ui-counter.warn { color:var(--text); border-color:var(--warn); background:var(--warning-soft); }
html[data-platform-theme] body.feika-ui .ui-counter.error { color:var(--text); border-color:var(--danger); background:var(--danger-soft); }
html[data-platform-theme] body.feika-ui .ui-counter.compact { min-width:16px; height:16px; padding:0 4px; font-size:10px; }
html[data-platform-theme] body.feika-ui .ui-counter.notification { color:var(--text); background:var(--panel); border-color:var(--brand); }
html[data-platform-theme] body.feika-ui .ui-avatar { display:inline-grid; place-items:center; width:var(--ui-avatar-size,44px); height:var(--ui-avatar-size,44px); border:1px solid currentColor; border-radius:var(--radius-control); overflow:hidden; background:transparent; color:inherit; font-size:var(--ui-avatar-font-size,14px); font-weight:650; background-size:cover; background-position:center; }
body.feika-ui .ui-avatar img { width:100%; height:100%; object-fit:cover; }
html[data-platform-theme] body.feika-ui .ui-control.ui-list-choice { display:grid; grid-template-columns:var(--ui-choice-columns,auto minmax(0,1fr) auto); align-items:center; gap:var(--ui-choice-gap,12px); width:100%; padding:var(--ui-control-padding,12px); text-align:left; }
html[data-platform-theme] body.feika-ui .ui-control.icon.navigation { font-size:24px; }
html[data-platform-theme] body.feika-ui .ui-tablist.stretch>[role=tab] { flex:1 1 0; min-width:0; white-space:normal; overflow-wrap:anywhere; }

html[data-platform-theme] body.feika-ui .ui-control.text { justify-content:flex-start; max-width:100%; padding:0 4px; text-align:start; }
html[data-platform-theme] body.feika-ui .ui-control.ui-composer-input { min-height:var(--ui-composer-min-height,112px); max-height:min(240px,calc(var(--ui-viewport-height) * .4)); }
html[data-platform-theme] body.feika-ui .ui-control.ui-back::before { content:"←"; margin-right:6px; }

html[data-platform-theme] body.feika-ui .ui-composer-footer { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px; }
html[data-platform-theme] body.feika-ui .ui-composer-footer>.ui-muted { flex:1 1 180px; margin-right:auto; }
html[data-platform-theme] body.feika-ui .ui-composer-footer>select.ui-control { width:auto; min-width:92px; }
@media(max-width:560px) { html[data-platform-theme] body.feika-ui .ui-composer-footer>button.ui-control { width:100%; } }
html[data-platform-theme] body.feika-ui .ui-heading-row { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; }
html[data-platform-theme] body.feika-ui .ui-heading-row>div { flex:1 1 240px; min-width:0; }

/* Editable tags and stacked project choices share geometry with other controls. */
html[data-platform-theme] body.feika-ui .ui-tag { display:inline-flex; align-items:center; gap:8px; min-width:0; max-width:100%; padding-left:12px; border:1px solid var(--line); border-radius:var(--radius-control); color:var(--text); background:var(--panel-2); overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui .ui-control.ui-list-choice.stack { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
html[data-platform-theme] body.feika-ui .ui-tablist.scroll { flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-inline:contain; scroll-padding:8px; }
html[data-platform-theme] body.feika-ui .ui-tablist.scroll>[role=tab] { flex:none; }

/* Native file selection belongs to the field face and inherits its state. */
html[data-platform-theme] body.feika-ui input[type=file].ui-control::file-selector-button { min-height:44px; margin-right:10px; padding:8px 12px; border:1px solid var(--line); border-radius:var(--radius-control); background:transparent; color:inherit; font:inherit; cursor:pointer; }
html[data-platform-theme] body.feika-ui input[type=file].ui-control:disabled::file-selector-button { cursor:not-allowed; }

/* Field help reserves a real target beside the label and opens readable text. */
html[data-platform-theme] body.feika-ui .ui-field-help-host { position:relative; }
html[data-platform-theme] body.feika-ui .ui-field-help-host>label { display:flex; align-items:center; min-height:44px; padding-right:56px; }
html[data-platform-theme] body.feika-ui .ui-field-help { min-width:0; }
html[data-platform-theme] body.feika-ui .ui-field-help>summary { position:absolute; top:0; right:0; list-style:none; }
html[data-platform-theme] body.feika-ui .ui-field-help>summary::-webkit-details-marker { display:none; }
html[data-platform-theme] body.feika-ui .ui-field-help>p { width:100%; max-height:calc(var(--ui-viewport-height) * .4); overflow:auto; }

/* A selected row has one foreground, including its descriptions and counters. */
html[data-platform-theme] body.feika-ui .ui-list-choice[aria-pressed=true] :is(div,p,h3,span,strong,small) { color:inherit!important; }

/* Dialog content, illustrated choices and long status labels share arrangements. */
body.feika-ui .ui-flow { display:flex; flex-direction:column; gap:16px; }
body.feika-ui .ui-flow>* { flex:none; min-width:0; }
body.feika-ui .ui-flow>p { margin:0; }
body.feika-ui .ui-flow>.ui-actions { margin-top:0; }
html[data-platform-theme] body.feika-ui .ui-choice-list { display:grid; gap:10px; min-width:0; container-type:inline-size; }
html[data-platform-theme] body.feika-ui .ui-control.ui-list-choice.media { grid-template-columns:92px minmax(0,1fr); }
body.feika-ui .ui-choice-art { min-width:0; overflow:hidden; }
body.feika-ui .ui-choice-art .cover { width:100%; height:60px; margin:0; }
body.feika-ui .ui-choice-art .cover-label { display:none; }
body.feika-ui .ui-choice-meta { display:grid; gap:6px; min-width:0; }
@container(max-width:320px) {
  html[data-platform-theme] body.feika-ui .ui-control.ui-list-choice.media { grid-template-columns:minmax(0,1fr); }
  body.feika-ui .ui-list-choice.media>.ui-choice-art { width:92px; }
}
/* Profile content moves to a full reading column when the avatar no longer fits. */
body.feika-ui .ui-profile { --ui-card-reader-height:min(96px,calc(var(--ui-viewport-height) * .2)); --ink-2:var(--text); }
body.feika-ui .ui-profile-row { display:flex; align-items:flex-start; flex-wrap:wrap; gap:16px; min-width:0; }
body.feika-ui .ui-profile-row>.ui-avatar { flex:none; }
body.feika-ui .ui-profile-row>.ui-profile-details { flex:1 1 240px; min-width:0; }
/* Messages use theme tokens for both senders and one readable text face. */
body.feika-ui .ui-chat-title { --ui-card-reader-height:min(48px,calc(var(--ui-viewport-height) * .1)); }
body.feika-ui .ui-message { display:grid; flex:none; align-self:flex-start; justify-items:start; gap:8px; min-width:0; max-width:min(85%,640px); }
body.feika-ui .ui-message.own { align-self:flex-end; justify-self:end; justify-items:end; }
body.feika-ui .ui-message-bubble { min-width:0; max-width:100%; padding:11px 14px; border:1px solid var(--line); border-radius:var(--radius-card); background:var(--panel-2); color:var(--text); font-size:14px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
body.feika-ui .ui-message.own>.ui-message-bubble { background:var(--brand-soft); border-color:var(--line-strong); }
body.feika-ui .ui-message-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px; max-width:100%; }
body.feika-ui .ui-message:has(>.ui-card) { width:100%; max-width:min(100%,440px); }
body.feika-ui .ui-message>.ui-card { width:100%; }
/* Label/value content keeps its meaning and full values across card widths. */
body.feika-ui .ui-description-list { display:grid; min-width:0; margin:0; gap:12px; container-type:inline-size; }
body.feika-ui .ui-description-list>div { display:grid; grid-template-columns:var(--ui-description-label-width,96px) minmax(0,1fr); align-items:start; gap:12px; min-width:0; }
body.feika-ui .ui-field { display:grid; align-content:start; gap:8px; min-width:0; }
html[data-platform-theme] body.feika-ui .ui-field>.ui-field-label { margin-bottom:0; }
body.feika-ui .ui-field output { color:var(--text); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
body.feika-ui .ui-fieldset { border:0; padding:0; min-width:0; }
body.feika-ui .ui-form-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:16px; min-width:0; container-type:inline-size; }
body.feika-ui .ui-form-grid>.ui-span-4 { grid-column:span 4; }
body.feika-ui .ui-form-grid>.ui-span-6 { grid-column:span 6; }
body.feika-ui .ui-form-grid>.ui-span-8 { grid-column:span 8; }
body.feika-ui .ui-form-grid>.ui-span-12 { grid-column:span 12; }
@container(max-width:560px) { body.feika-ui .ui-form-grid>:is(.ui-field,[class*="ui-span-"]) { grid-column:1 / -1; } }
body.feika-ui .ui-panel.compact { --ui-panel-padding:12px; --ui-panel-header-padding:12px; --ui-footer-padding:12px; --ui-footer-top-padding:8px; --ui-footer-bottom-padding:12px; --ui-actions-offset:0px; }
@container(max-width:320px) { body.feika-ui .ui-description-list>div { grid-template-columns:minmax(0,1fr); gap:4px; } }
/* Chat keeps reading space between its header and a bounded composer. */
body.feika-ui .ui-chat { display:flex; flex-direction:column; gap:8px; min-width:0; min-height:0; height:var(--ui-chat-height,min(640px,calc(var(--ui-viewport-height) - 24px))); max-height:var(--ui-chat-height,min(640px,calc(var(--ui-viewport-height) - 24px))); overflow:hidden; container-type:inline-size; scroll-margin-block-start:var(--ui-chat-top-inset,0px); }
html[data-platform-theme] body.feika-ui .ui-chat>.ui-chat-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; flex:none; align-items:center; gap:8px; margin:0; padding:0; min-height:44px; border:0; }
body.feika-ui .ui-chat-head>.ui-chat-title { grid-column:2; }
body.feika-ui .ui-chat-head>.ui-action-menu { grid-column:3; grid-row:1; }
html[data-platform-theme] body.feika-ui .ui-chat>.ui-chat-body { display:flex; flex-direction:column; flex:1 1 0; min-height:0; gap:8px; padding:0; overflow:hidden; }
body.feika-ui .ui-chat-messages { display:flex; flex-direction:column; flex:1 1 0; min-width:0; min-height:0; width:100%; height:auto; max-height:none; gap:16px; padding:8px 4px; border:0; background:transparent; overflow:auto; overscroll-behavior:contain; }
body.feika-ui .ui-chat-composer { display:grid; flex:none; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; min-width:0; margin:0; padding:8px 0 max(4px,env(safe-area-inset-bottom)); border:0; border-top:1px solid var(--line); background:transparent; }
html[data-platform-theme] body.feika-ui .ui-chat-composer>textarea.ui-control { grid-column:1/-1; min-height:60px; height:60px; max-height:min(160px,calc(var(--ui-chat-height) * .25)); padding:6px 10px; font-size:16px; line-height:1.4; resize:vertical; }
body.feika-ui .ui-chat-body:has(>.ui-chat-event:not(.hide))>.ui-chat-composer { display:none; }
body.feika-ui .ui-chat-body:has(>.ui-chat-event:not(.hide))>.ui-chat-messages { flex:0 0 0; padding-block:0; }
body.feika-ui .ui-chat-body>.ui-chat-event { flex:1 1 0; min-height:0; max-height:100%; }
@media(max-width:760px) {
  body.feika-ui .ui-chat-composer { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.feika-ui .ui-chat-composer>.ui-meta { display:none; }
  body.feika-ui .ui-chat-composer>textarea.ui-control { resize:none; }
  body.feika-ui .ui-chat-composer>button.ui-control { width:100%; }
}
@container (min-width:420px) {
  html[data-platform-theme] body.feika-ui .ui-chat-composer>textarea.ui-control { grid-column:1; grid-row:1; }
  body.feika-ui .ui-chat-composer>.ui-meta { grid-column:1/-1; grid-row:2; }
  body.feika-ui .ui-chat-composer>button.ui-control { grid-row:1; }
}
@media(max-height:600px) { body.feika-ui .ui-chat-composer>.ui-meta { display:none; } }
/* Native disclosure menus share one face and keyboard lifecycle. */
body.feika-ui .ui-action-menu { position:relative; flex:none; min-width:0; }
body.feika-ui .ui-action-menu:not(:has(>.ui-menu-actions>.ui-control:not(.hide))) { display:none; }
body.feika-ui .ui-action-menu>summary { list-style:none; }
body.feika-ui .ui-action-menu>summary::-webkit-details-marker { display:none; }
body.feika-ui .ui-action-menu>.ui-menu-actions { position:absolute; inset-block-start:calc(100% + 8px); inset-inline-end:var(--ui-menu-inset-end,0px); z-index:60; width:min(240px,calc(var(--ui-viewport-width) - 32px)); max-height:min(320px,calc(var(--ui-viewport-height) * .5),var(--ui-menu-available-height,320px)); margin:0; padding:8px; border:1px solid var(--line); border-radius:var(--radius-control); background:var(--panel); box-shadow:var(--shadow-dialog); overflow:auto; }
body.feika-ui .ui-action-menu[data-ui-menu-placement=above]>.ui-menu-actions { inset-block-start:auto; inset-block-end:calc(100% + 8px); }
body.feika-ui .ui-action-menu>.ui-menu-actions>.ui-control { font-size:var(--ui-control-font-size,14px); }
html[data-platform-theme] body.feika-ui .ui-field-actions.pair { grid-template-columns:minmax(0,1fr) auto; }
html[data-platform-theme] body.feika-ui .ui-counter.wrap { max-width:100%; height:auto; min-height:20px; padding:4px 8px; color:var(--text); line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
body.feika-ui .ui-table-scroll { max-width:100%; max-height:min(420px,calc(var(--ui-viewport-height) * .4)); }
body.feika-ui .ui-table { width:100%; min-width:var(--ui-table-min-width,620px); border-collapse:collapse; text-align:left; }
body.feika-ui .ui-table th { padding:11px 14px; color:var(--ink-2); background:var(--panel-2); font-size:12px; font-weight:600; }
body.feika-ui .ui-table td { padding:14px; border-top:1px solid var(--line); vertical-align:top; line-height:1.55; overflow-wrap:anywhere; }
body.feika-ui .ui-table td>strong { display:block; }
body.feika-ui .ui-table td>p { margin:0; }
html[data-platform-theme] body.feika-ui [data-ui-feedback].ui-feedback-details { max-height:none; white-space:normal; }
body.feika-ui .ui-feedback-details>p { margin:12px 0; }
body.feika-ui .ui-record-path.bounded { max-height:min(240px,calc(var(--ui-viewport-height) * .3)); }
@media(max-width:760px) { html[data-platform-theme] body.feika-ui .ui-field-actions.pair { grid-template-columns:minmax(0,1fr); } }

/* A dialog hosts a reusable form panel without drawing a second frame. */
body.feika-ui dialog.ui-dialog>.ui-panel { flex:1 1 auto; max-height:none; border:0; border-radius:0; background:transparent; background-image:none!important; box-shadow:none; }
body.feika-ui .ui-dialog-header>div { min-width:0; }
body.feika-ui .ui-form { --ui-label-color:var(--text); }
html[data-platform-theme] body.feika-ui .ui-form .ui-field-label { color:var(--ui-label-color); }

/* Reported progress and unknown waits share one primitive in every panel. */
body.feika-ui .ui-progress { width:100%; height:8px; border-radius:var(--radius-control); background:var(--line); overflow:hidden; }
body.feika-ui .ui-progress>div { height:100%; border-radius:inherit; background:var(--brand); transition:width .3s ease; }
body.feika-ui .ui-progress:has(>.is-indeterminate) { width:24px; height:24px; border:2px solid var(--line); border-top-color:var(--brand); border-radius:50%; background:transparent; animation:ui-progress-wait .85s linear infinite; }
body.feika-ui .ui-progress>.is-indeterminate { display:none; }
body.feika-ui .ui-progress-note { font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
@keyframes ui-progress-wait { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { body.feika-ui .ui-progress { animation:none; } body.feika-ui .ui-progress>div { transition:none; } }

/* Sidebar entries arrange the semantic navigation face shared with native shells. */
html[data-platform-theme] body.feika-ui .ui-control.ui-nav { flex:none; width:100%; justify-content:flex-start; gap:12px; margin:0; text-align:left; }

/* Data surfaces share readable messages and one loading treatment. */
html[data-platform-theme] body.feika-ui .ui-state { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; grid-column:1/-1; min-width:0; width:100%; padding:var(--ui-state-padding,24px 16px); color:var(--ink-2); text-align:center; overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui .ui-state-message { min-width:0; max-width:65ch; margin:0; color:var(--ink-2); font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui .ui-state-title { max-width:65ch; color:var(--text); font-size:16px; font-weight:650; line-height:1.5; overflow-wrap:anywhere; }
body.feika-ui .ui-state-details { min-width:0; width:100%; max-width:65ch; text-align:start; }
body.feika-ui .ui-state-details>summary { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
body.feika-ui .ui-state-details>.ui-code { margin-bottom:0; }
body.feika-ui .ui-state-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; min-width:0; max-width:100%; }
body.feika-ui .ui-state-actions>.ui-control { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui .ui-state-caption { display:flex; align-items:center; justify-content:center; gap:12px; min-width:0; width:100%; }
html[data-platform-theme] body.feika-ui .ui-state-caption > .ui-progress { flex:none; }
.skeleton-block { display:block; border-radius:var(--radius-control); background:var(--line); opacity:.6; animation:ui-skeleton-breathe 1.8s ease-in-out infinite alternate; }
.skeleton-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; width:100%; }
.skeleton-item { min-width:0; display:flex; gap:16px; padding:16px 0; }
.skeleton-grid .skeleton-item { flex-direction:column; }
.skeleton-copy { flex:1; min-width:0; padding-block:4px; }
.skeleton-cover { width:76px; height:58px; flex:none; }
.skeleton-grid .skeleton-cover { width:100%; height:auto; aspect-ratio:16/9; }
.skeleton-title { width:52%; height:16px; margin-bottom:18px; }
.skeleton-line { width:94%; height:10px; margin:10px 0; }
.skeleton-line.short { width:62%; }
.skeleton-hero { width:100%; height:clamp(200px,28vw,340px); margin-bottom:24px; }
@keyframes ui-skeleton-breathe { from {opacity:.3} to {opacity:.65} }
@media(max-width:760px) { .skeleton-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; } }
@media(prefers-reduced-motion:reduce) { .skeleton-block { animation:none; } }

/* Featured content keeps media, readable copy and reachable actions in normal flow. */
html[data-platform-theme] body.feika-ui .ui-feature { position:relative; display:flex; flex-direction:column; height:auto; max-height:none; min-width:0; border:1px solid var(--line); border-radius:var(--radius-panel,12px); color:var(--text); background-color:var(--panel); }
html[data-platform-theme] body.feika-ui .ui-feature-art { min-width:0; }
html[data-platform-theme] body.feika-ui .ui-feature-media { width:100%; height:clamp(160px,24vw,280px); background-image:var(--ui-feature-image,none); background-size:cover; background-position:center; }
html[data-platform-theme] body.feika-ui .ui-feature.no-image .ui-feature-media { display:none; }
html[data-platform-theme] body.feika-ui .ui-feature-copy { display:flex; flex-direction:column; align-items:flex-start; gap:12px; min-width:0; padding:20px 60px; color:var(--text); }
html[data-platform-theme] body.feika-ui .ui-feature-eyebrow { font-size:12px; font-weight:650; line-height:1.5; color:var(--ink-2); }
html[data-platform-theme] body.feika-ui .ui-feature-title { max-width:100%; margin:0; color:var(--text); font-size:clamp(23px,2vw,32px); font-weight:700; line-height:1.3; overflow-wrap:anywhere; text-shadow:none; }
html[data-platform-theme] body.feika-ui .ui-feature-summary { max-width:100%; max-height:min(200px,calc(var(--ui-viewport-height) * .4)); margin:0; padding:2px 4px 2px 0; color:var(--ink-2); font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui .ui-feature-tags { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; max-width:100%; }
html[data-platform-theme] body.feika-ui .ui-feature-controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:0; padding:0 48px 14px; position:static; }
html[data-platform-theme] body.feika-ui .ui-feature-dots { display:flex; flex-wrap:nowrap; justify-content:center; gap:0; min-width:0; max-width:100%; overflow-x:auto; }
/* Restore the last committed side arrows / small indicators; component geometry owns sizing. */



html[data-platform-theme] body.feika-ui .ui-feature-controls > .ui-feature-arrow { position:absolute; top:50%; z-index:3; translate:0 -50%; transform:none; width:32px; min-width:32px; height:32px; min-height:32px; padding:5px; --radius-control:50%; border-radius:50%; }
html[data-platform-theme] body.feika-ui .ui-feature-arrow svg { width:20px; height:20px; }
html[data-platform-theme] body.feika-ui .ui-feature-prev { left:16px; }
html[data-platform-theme] body.feika-ui .ui-feature-next { right:16px; }

html[data-platform-theme] body.feika-ui button.ui-feature-dot { display:grid; place-items:center; flex:0 0 28px; width:28px; min-width:0; height:24px; min-height:0; padding:0; border:0; border-radius:4px; background:transparent; background-image:none; box-shadow:none; color:var(--muted); }
html[data-platform-theme] body.feika-ui .ui-feature-dot::before { content:""; width:6px; height:6px; border-radius:99px; background:currentColor; }
html[data-platform-theme] body.feika-ui .ui-feature-dot[aria-current=true] { color:var(--text); }
html[data-platform-theme] body.feika-ui .ui-feature-dot[aria-current=true]::before { width:20px; }
html[data-platform-theme] body.feika-ui .ui-feature-dot:focus-visible { outline:2px solid var(--brand); outline-offset:-2px; }
html[data-platform-theme] body.feika-ui .ui-feature-controls [hidden] { display:none!important; }
/* Two bounded rows: semantic declarations, then two filter tags and a detail link for the rest. */
html[data-platform-theme] body.feika-ui .game-card .card-metadata { display:grid; grid-template-rows:22px 22px; gap:4px; min-height:48px; max-height:none; overflow:visible; margin-top:auto; }
html[data-platform-theme] body.feika-ui .game-card .card-capabilities { display:flex; align-items:center; flex-wrap:nowrap; gap:4px; min-width:0; height:22px; overflow-x:auto; scrollbar-width:thin; }
html[data-platform-theme] body.feika-ui .game-card .card-capabilities .ui-counter { flex:none; height:22px; min-height:0; max-width:none; padding:2px 6px; font-size:11px; font-weight:500; line-height:16px; white-space:nowrap; overflow-wrap:normal; }
html[data-platform-theme] body.feika-ui .game-card .card-tags { grid-row:2; display:flex; flex-wrap:nowrap; align-items:center; gap:4px; min-width:0; height:22px; }
html[data-platform-theme] body.feika-ui .game-card .card-tags > .ui-control { --ui-target-size:22px; --ui-control-font-size:11px; --ui-control-padding:2px 6px; display:block; flex:0 1 auto; min-width:0; max-width:100%; height:22px; border-radius:5px; line-height:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html[data-platform-theme] body.feika-ui .game-card .card-tags > .card-tags-more { display:block; flex:none; }
html[data-platform-theme] body.feika-ui .game-card .card-tags > .ui-control:focus-visible { outline-offset:0; }
html[data-platform-theme] body.feika-ui .game-card .card-title { min-height:2.9em; }
html[data-platform-theme] body.feika-ui .game-card .game-card-body > .fine { min-height:3em; overflow-wrap:anywhere; }
@media(max-width:760px) {
 html[data-platform-theme] body.feika-ui .ui-feature-copy { padding-inline:44px; }
 html[data-platform-theme] body.feika-ui .ui-feature-controls > .ui-feature-arrow { width:28px; min-width:28px; height:28px; min-height:28px; padding:3px; }
 html[data-platform-theme] body.feika-ui .ui-feature-prev { left:7px; }
 html[data-platform-theme] body.feika-ui .ui-feature-next { right:7px; }
}
html[data-platform-theme] body.feika-ui .ui-control.icon svg { display:block; flex:none; width:20px; height:20px; }
html[data-platform-theme] body.feika-ui .ui-feature:is([data-ui-state=empty],[data-ui-state=error]) :is(.ui-feature-eyebrow,.ui-feature-tags,.ui-feature-controls,[data-ui-feature-open]) { display:none; }

html[data-platform-theme] body.feika-ui button.is-loading::before { content:""; display:inline-block; flex:none; width:12px; height:12px; margin-right:7px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:ui-progress-wait .85s linear infinite; }
@media(prefers-reduced-motion:reduce) { html[data-platform-theme] body.feika-ui button.is-loading::before { animation:none; } }

html[data-platform-theme] body.feika-ui .ui-state[data-ui-feedback] { display:block; text-align:start; --ui-state-padding:10px 12px; }

html[data-platform-theme] body.feika-ui .ui-feature-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,32%); align-items:start; gap:16px; margin:0 0 24px; min-width:0; }
html[data-platform-theme] body.feika-ui .ui-feature-layout:is([data-ui-state=empty],[data-ui-state=error]) { grid-template-columns:minmax(0,1fr); }
html[data-platform-theme] body.feika-ui .ui-feature-layout:is([data-ui-state=empty],[data-ui-state=error]) > .ui-feature-list { display:none; }
html[data-platform-theme] body.feika-ui .ui-feature-list { min-width:0; border:1px solid var(--line); border-radius:var(--radius-panel,12px); background-color:var(--panel); }
@media(max-width:980px) { html[data-platform-theme] body.feika-ui .ui-feature-layout { grid-template-columns:minmax(0,1fr); } html[data-platform-theme] body.feika-ui .ui-feature-layout > .ui-feature-list { display:none; } }

html[data-platform-theme] body.feika-ui .ui-feature-picks { display:grid; grid-template-columns:minmax(0,1fr); grid-auto-rows:auto; gap:12px; min-width:0; }
html[data-platform-theme] body.feika-ui .ui-feature-pick { display:grid; grid-template-columns:72px minmax(0,1fr); align-items:start; gap:12px; min-width:0; width:100%; padding:12px; cursor:pointer; }
html[data-platform-theme] body.feika-ui .ui-feature-pick.no-cover { grid-template-columns:minmax(0,1fr); }
html[data-platform-theme] body.feika-ui .ui-feature-pick > .cover { width:72px; height:54px; min-height:54px; margin:0; }
html[data-platform-theme] body.feika-ui .ui-feature-pick-copy { display:flex; flex-direction:column; gap:8px; min-width:0; color:inherit; }
html[data-platform-theme] body.feika-ui .ui-feature-pick-title { display:block; overflow-wrap:anywhere; color:inherit; font-size:14px; line-height:1.5; }
html[data-platform-theme] body.feika-ui .ui-feature-pick-summary { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin:0; color:inherit; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
html[data-platform-theme] body.feika-ui .ui-feature-pick-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; color:inherit; }
html[data-platform-theme] body.feika-ui .ui-feature-pick-meta > * { min-width:0; max-width:100%; }
html[data-platform-theme] body.feika-ui .ui-feature-pick-author { display:block; flex-basis:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:1.6; }

/* static/ui-materials.css */
/* static/ui-groups.css */
/* Content groups inherit their page's canvas. Only the owner draws a backdrop.
   New groups use data-ui-surface="group" instead of defining another face. */
:root :is(
  [data-ui-surface=group],
  .wb-tool-surface,.wb-tool-layout,.wb-tool-rail,.wb-tool-sequence,
  .wb-tool-row,.wb-tool-toolbar,.wb-tool-group,.wb-tool-section,.wb-tool-field-help,.wb-tool-hint,
  .wb-tool-sequence>ol>li,.wb-tool-columns>aside,.wb-tool-layout>footer,
  .wb-scene-property-group,.wb-data-group,.wb-data-block,.wb-data-document,
  .wb-data-block>header,.wb-data-document>header,
  .wb-production-card,.wb-production-status,.wb-production-loading,
  .wb-production-continuation,.wb-activity-fact,.wb-activity-issue,
  .wb-publication-error-detail>p,.env-card,.help-content,.agent-profiles-help,
  .wb-composer-reference-tools,.wb-composer-references,.wb-composer-attachments,
  .wb-themed-resource-candidates label[data-index],
  .publication-section,.publication-dependent-options,.publication-media-card,
  .publication-release-summary,.publication-catalog-editor,.publication-catalog-sidebar,
  .publication-gallery-placeholder,.content-language-tabs,
  .publication-embedded #developerView .empty,
  .publication-embedded .upload-drop,
  .publication-embedded .review-status,.publication-embedded .readiness-item,
  .publication-embedded .modal-terms,.publication-embedded .log,
  .publication-embedded .bridge-log,#bridgeLog,#backendOutput,
  .config-card,.help-card,.terms-copy,.copy-block,
  .local-path,.downloaded-footer,.selection-footer
):not(:is(.active,.is-selected,.is-current,.is-editing,[aria-selected=true],[aria-pressed=true])):not(:has(>input:checked)) {
  background:none!important;
  box-shadow:none!important;
}

/* static/ui-controls.css */
/* Shared by native web shells, installed tools and hosted platform pages.
   Edit here; sync-platform-theme.mjs publishes the same source to the backend. */
:root[data-workbench-theme] {
  --control-accent:var(--ui-accent);
  --control-on-accent:var(--ui-on-accent);
  --control-canvas:var(--ui-material-canvas,none);
}
:root[data-platform-theme] {
  --control-accent:var(--brand,var(--ui-accent));
  --control-on-accent:var(--on-brand,var(--ui-on-accent));
  --control-canvas:var(--material-canvas,var(--ui-material-canvas,none));
}
:root:is([data-workbench-theme=painted-light],[data-workbench-theme=painted-dark],[data-platform-theme=painted-light],[data-platform-theme=painted-dark]) {
  --ui-material-size:720px;
  --material-size:var(--ui-material-size);
}
:root:is([data-workbench-theme=painted-light],[data-platform-theme=painted-light]) {
  --control-primary-opacity:94%;
}
:root:is([data-workbench-theme=feika],[data-workbench-theme=painted-light],[data-workbench-theme=painted-dark],[data-platform-theme=feika],[data-platform-theme=painted-light],[data-platform-theme=painted-dark]) {
  /* Preserve brush marks while keeping light canvas from washing out the accent. */
  --control-primary-wash:color-mix(in srgb,var(--control-accent) var(--control-primary-opacity,92%),transparent);
  --ui-material-primary:var(--control-primary-wash)!important;
  --material-primary-wash:var(--control-primary-wash)!important;
  --catalog-primary-wash:var(--control-primary-wash)!important;
  --ui-material-primary-blend:normal,normal!important;
  --material-primary-wash-blend:normal,normal!important;
  --catalog-primary-blend:normal,normal!important;
}
/* Primary actions use the same face, including actions in embedded tools. */
:root:is([data-workbench-theme=feika],[data-workbench-theme=painted-dark],[data-platform-theme=feika],[data-platform-theme=painted-dark]) :is(
  .primary,.wb-tool-primary,.pc-primary,.wb-send,.pet-chat-send,.workbench-play,
  .library-primary-action,a.button,.btn-download,.cxd-Button--primary,
  #featuredOpenBtn,#primaryGameActionBtn,#saveDevItemBtn,#publishGameBtn,
  #homeRankPreview .toolbar>button,.bug-report-panel button[type=submit],
  .wb-scene-asset-picker footer>button,.assistant-care-actions button,
  .voxel-authoring-dialog footer>button:last-child,
  body.feika-ui button:not([class]):not(.tabs button):not([data-platform-theme-choice])
):not(:disabled):not([aria-disabled=true]),
/* Semantic selection also applies inside tool surfaces with transparent layouts. */
:root:is([data-workbench-theme=feika],[data-workbench-theme=painted-dark],[data-platform-theme=feika],[data-platform-theme=painted-dark]):is([data-workbench-theme],[data-platform-theme])
  :is(button,a,[role=button],[role=tab],.dv-tab):is([aria-pressed=true],[aria-selected=true],[aria-current=page],.active,.is-selected,.is-current,.dv-active-tab):not(:disabled):not([aria-disabled=true]):not([data-ui-control=tab]):not([data-ui-control=navigation]) {
  background-color:var(--control-accent)!important;
  color:var(--control-on-accent)!important; --control-metadata-ink:var(--control-on-accent);
  background-image:linear-gradient(var(--control-primary-wash),var(--control-primary-wash)),var(--control-canvas)!important;
  background-size:auto,var(--ui-material-size,720px) var(--ui-material-size,720px)!important;
  background-blend-mode:normal,normal!important;
  border-color:transparent!important;
  text-shadow:none;
}

/* Underline navigation and secondary actions have distinct shared semantics.
   A selected tab must never inherit the primary action face. */
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=tab] {
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  flex:none; min-width:44px; min-height:44px; padding:12px 8px; border:0!important; border-radius:0!important;
  color:var(--ink-2,var(--ui-muted)); background:transparent!important;
  background-image:none!important; box-shadow:none!important; text-shadow:none;
  font:inherit; font-size:14px; font-weight:400;
}
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=tab][aria-selected=true] {
  color:var(--text,var(--ui-text))!important; font-weight:600;
  box-shadow:inset 0 -2px var(--control-accent)!important;
}
:root:is([data-workbench-theme],[data-platform-theme]) :is([data-ui-control=secondary],.ui-control.secondary,.ui-control.warn):not(:disabled):not([aria-disabled=true]) {
  color:var(--text,var(--ui-text)); background-color:var(--panel-2,var(--ui-panel-raised));
  border:1px solid var(--line,var(--ui-border)); border-radius:var(--radius-control,6px);
  background-image:linear-gradient(var(--material-row-wash,var(--ui-material-row-wash,transparent)),var(--material-row-wash,var(--ui-material-row-wash,transparent))),var(--control-canvas);
  background-size:auto,var(--ui-material-size,720px) var(--ui-material-size,720px);
  background-blend-mode:var(--material-blend,normal,normal);
}
:root:is([data-workbench-theme],[data-platform-theme]) :is([data-ui-control],.ui-control):focus-visible {
  outline:2px solid var(--control-accent); outline-offset:3px;
}

/* Backend form controls share these faces with platform/native controls.
   ui-components.css only arranges controls, panels and feedback regions. */
:root:is([data-workbench-theme],[data-platform-theme]) .ui-control.primary:not(:disabled):not([aria-disabled=true]) {
  color:var(--control-on-accent); --control-metadata-ink:var(--control-on-accent); background:var(--control-accent); font-weight:650;
}
:root:is([data-workbench-theme=painted-light],[data-workbench-theme=painted-dark],[data-platform-theme=painted-light],[data-platform-theme=painted-dark]) .ui-control.primary:not(:disabled):not([aria-disabled=true]) {
  background-image:linear-gradient(var(--control-primary-wash),var(--control-primary-wash)),var(--control-canvas);
  background-size:auto,var(--ui-material-size,720px) var(--ui-material-size,720px);
  background-blend-mode:normal,normal;
}
:root:is([data-workbench-theme],[data-platform-theme]) :is([data-ui-control],.ui-control):is(:disabled,[aria-disabled=true]) {
  opacity:1; color:var(--ink-2,var(--ui-muted)); --control-metadata-ink:var(--ink-2,var(--ui-muted)); background:var(--panel-2,var(--ui-panel-raised));
  border:1px dashed var(--line-strong,var(--ui-border)); cursor:not-allowed;
}

/* Toggle choices share action color and retain material texture when selected. */
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=choice][aria-pressed=true]:not(:disabled) {
  color:var(--control-on-accent)!important; --control-metadata-ink:var(--control-on-accent); background-color:var(--control-accent)!important;
  border-color:transparent!important; box-shadow:none;
}
:root:is([data-workbench-theme=painted-light],[data-workbench-theme=painted-dark],[data-platform-theme=painted-light],[data-platform-theme=painted-dark]) [data-ui-control=choice][aria-pressed=true]:not(:disabled) {
  background-image:linear-gradient(var(--control-primary-wash),var(--control-primary-wash)),var(--control-canvas)!important;
  background-size:auto,var(--ui-material-size,720px) var(--ui-material-size,720px)!important;
  background-blend-mode:normal,normal!important;
}
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=choice][aria-pressed=true] :is(strong,small,span,em) { color:inherit!important; }

:root:is([data-workbench-theme],[data-platform-theme]) :is(.ui-control,[data-ui-control=choice]) { white-space:normal; overflow-wrap:anywhere; }

:root:is([data-workbench-theme],[data-platform-theme]) .ui-control.warn:not(:disabled):not([aria-disabled=true]) { border-color:var(--warn,var(--control-accent)); }

/* Text actions retain full keyboard targets without a raised action face. */
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=text]:not(:disabled):not([aria-disabled=true]) {
  color:var(--text,var(--ui-text)); border-color:transparent!important; background:transparent!important;
  background-image:none!important; box-shadow:none!important;
}
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=text]:hover:not(:disabled):not([aria-disabled=true]) {
  text-decoration:underline; text-underline-offset:3px;
}

/* Navigation: one face for sidebar, drawer and header actions in every theme. */
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=navigation]:not(:disabled):not([aria-disabled=true]) {
  color:var(--text,var(--ui-text)); border:1px solid transparent;
  border-radius:var(--radius-control,6px); background:transparent!important;
  background-image:none!important; box-shadow:none; text-shadow:none;
  filter:none; transform:none; text-decoration:none;
}
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=navigation]:is(:hover,:active):not(:disabled):not([aria-disabled=true]) {
  background:var(--panel-2,var(--ui-panel-raised))!important;
}
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=navigation][aria-current=page]:not(:disabled):not([aria-disabled=true]) {
  color:var(--control-on-accent)!important; --control-metadata-ink:var(--control-on-accent); background:var(--control-accent)!important;
  font-weight:650; border-color:transparent;
}
:root:is([data-workbench-theme=painted-light],[data-workbench-theme=painted-dark],[data-platform-theme=painted-light],[data-platform-theme=painted-dark]) [data-ui-control=navigation][aria-current=page]:not(:disabled):not([aria-disabled=true]) {
  background-image:linear-gradient(var(--control-primary-wash),var(--control-primary-wash)),var(--control-canvas)!important;
  background-size:auto,var(--ui-material-size,720px) var(--ui-material-size,720px);
  background-blend-mode:normal,normal;
}
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=navigation]:focus-visible { text-decoration:none; }
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-control=navigation] :is(span,strong,small) { color:inherit; }

/* A selected action exposes its ink through wrappers; metadata shares that ink. */
:root:is([data-workbench-theme],[data-platform-theme]) [data-ui-counter=metadata] { color:var(--control-metadata-ink,var(--text,var(--ui-text)))!important; }

/* Shared raster surfaces for every FEIKA page. Layout stays with each page. */
html[data-platform-theme=painted-light] {
  --material-canvas:url('/static/media/ui/canvas-light-v2.webp');
  --material-page-wash:#f2f2f28c; --material-sidebar-wash:#f9f9f98c;
  --material-panel-wash:#f9f9f9a6; --material-row-wash:#eeeeee73;
  --material-active-wash:#e0e9e78c; --material-primary-wash:#386974d6;
  --material-blend:normal,luminosity; --material-primary-wash-blend:normal,normal;
  --material-control-active-wash:var(--material-active-wash);
  --material-control-active-blend:var(--material-blend);
}
html[data-platform-theme=painted-dark] {
  --material-canvas:url('/static/media/ui/canvas-dark-v2.webp');
  --material-page-wash:#1414148c; --material-sidebar-wash:#2020208c;
  --material-panel-wash:#202020a6; --material-row-wash:#2b2b2b73;
  --material-active-wash:#51452f99;
  --material-blend:normal,luminosity;
  --material-control-active-wash:var(--material-primary-wash);
  --material-control-active-blend:normal,normal;
}
html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui {
  background-image:linear-gradient(var(--material-page-wash),var(--material-page-wash)),var(--material-canvas)!important;
  background-size:auto,var(--material-size) var(--material-size)!important;
    background-blend-mode:var(--material-blend);
  & > .shell > .topbar, & .topbar-inner, & #platformNavigation, & .mobile-page-title, & .mobile-drawer-head, & .sidebar, & .side-nav  {
    background-color:var(--surface)!important;

    background-image:linear-gradient(var(--material-sidebar-wash),var(--material-sidebar-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important;
    background-blend-mode:var(--material-blend);
  }
  & :is([data-ui-feedback],.ui-log,.ui-toast,.ui-surface,.ui-panel,.panel,.card,.ui-card,.modal-card,.modal-dialog,.game-card,.mini-feature,.rank-board,.intro-panel,.user-shell,.user-space-profile,.dev-sidebar,.dev-workspace,.friends-shell,.friends-list,.friends-messages,.tweet-composer,.modal-panel,.stat,.account-hero,.system-metric):not(:where(#recommendationGrid .game-card))  {
    background-color:var(--surface)!important;
    background-image:linear-gradient(var(--material-panel-wash),var(--material-panel-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important;
    background-blend-mode:var(--material-blend);
  }
  & #storeView .rank-row.active {
    background-image:linear-gradient(var(--material-active-wash),var(--material-active-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important;
    background-blend-mode:var(--material-blend);
  }
  & #storeView .rank-row.active {
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 9%,transparent);
  }
  & :is(button.primary,#homeRankPreview .toolbar > button) {
    box-shadow:var(--shadow-button);
  }
  & :is(button.primary,button:not([class]):not(.tabs button):not([data-platform-theme-choice]),#primaryGameActionBtn,.library-primary-action,#homeRankPreview .toolbar > button,.rank-tab.active,.dev-tab.active,.content-language-tab.active,.library-filter-button.active):not(:disabled):not([aria-disabled=true]) {
    background-color:var(--brand)!important; color:var(--on-brand)!important;
    background-image:linear-gradient(var(--material-primary-wash),var(--material-primary-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important;
    background-blend-mode:var(--material-primary-wash-blend);
  }
  & :is(#gameSystemModal,.platform-management,.platform-content) button:disabled  {
    background-color:var(--panel-2)!important;
     color:var(--ink-2)!important;
    background-image:linear-gradient(var(--material-row-wash),var(--material-row-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important;
    background-blend-mode:var(--material-blend)!important;
    box-shadow:none; opacity:1;
  }
  & :is(.side-nav .nav-item.active,.dev-game-item.active) {
    background-image:linear-gradient(var(--material-control-active-wash),var(--material-control-active-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important;
    background-blend-mode:var(--material-control-active-blend)!important;
  }
  & :is(button.primary,#homeRankPreview .toolbar > button):hover:not(:disabled):not([aria-disabled=true]) {
    box-shadow:var(--shadow-button);
  }
  & #platformNavigation .home-creator-card {
    border-color:var(--line); box-shadow:var(--shadow-card);
  }
}

html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui {
  & :is(.login-card,.email-chip,.auth-panel,.account-card,.account-full-view,.account-detail-layout,.intro-card,.user-home-head,.tweet-item,.tweet-detail,.discussion-composer,.game-discussion-page,.announcement,.social-feed-panel,.twitter-main,.twitter-timeline,.friends-page,.ui-message-bubble,.package-picker-item,.catalog-card,.dev-item-row,.dev-workspace-head,.dev-tags-field,.upload-drop,.upload-overlay-card,.config-modal,.dialog,.buy-box,.item,.payment-lock,.recharge-summary,.lottery-card,.lottery-prize,.lottery-pool-hero,.lottery-prize-panel,.lottery-main,.lottery-side,.lottery-empty-visual,.playtime-card,.play-progress-panel,.game-status-main,.game-status-stat,.reward-stage,.reward-stage-list,.cf-project-card,.cf-workspace-card,.cf-workspace-panel,.cf-detail-panel,.cf-game-summary,.cf-game-stats,.cf-proposal,.cf-comment,.cf-message-list,.cf-message-row,.cf-donate-box,.cf-quota-item,.cf-state-doc,.cf-md-upload,.cf-notice,.cf-workspace-board-card,.cf-workspace-task,.metrics,.metrics>div,.notice,.toast-item,.download-card,.channel-menu,.channel-dropdown,.profile-card,.admin-box,.trend-card,.cxd-Panel,.publication-editor,.publication-store-preview,.summary,.shop-card,.stage-card,.result-card,.reward-box,.password-setup,.mini-panel,.drawer,.log-list,.feedback)  {
    background-color:var(--surface)!important;
    background-image:linear-gradient(var(--material-panel-wash),var(--material-panel-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-blend)!important;
  }
  & :is(.panel-head,.panel-header,.social-sticky-head,.timeline-head,.store-filters,.filter-bar,.section-banner,.content-language-tabs,.catalog-filter-tabs,.friends-toolbar,.cf-project-appbar,.cf-toolbar,.cf-forum-nav,.cf-game-nav,.cf-proposal-footer,.modal-card>header,.modal-card>footer,.modal-dialog>header,.publication-preview-heading)  {
    background-color:var(--surface)!important;
    background-image:linear-gradient(var(--material-sidebar-wash),var(--material-sidebar-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-blend)!important;
  }
  & :is(.cf-tab.active,.cf-forum-nav button.active,.cf-game-nav button.active,.inventory-tab.active,.amount-option.active,.amount-option.is-selected,.scope button.active,.gp-lang-btn.active,[role=tab][aria-selected=true]:not([data-ui-control=tab]),button[aria-pressed=true],button[aria-current=page]):not([data-ui-control]) {
    background-image:linear-gradient(var(--material-control-active-wash),var(--material-control-active-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-control-active-blend)!important;
  }
  & :is(.dev-item-row.is-editing,.sub2api-group-option.is-selected,.dev-item-check:has(input:checked)) {
    background-image:linear-gradient(var(--material-active-wash),var(--material-active-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-blend)!important;
  }
  & :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea,pre,.readonly-field) {
    background-color:var(--bg-2);
    background-image:linear-gradient(color-mix(in srgb,var(--bg-2) 88%,transparent),color-mix(in srgb,var(--bg-2) 88%,transparent)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-blend)!important;
  }
  & :is(.primary,a.button,.btn-download,.stat-action.primary,.cxd-Button--primary,#saveDevItemBtn,#publishGameBtn):not(:disabled):not([aria-disabled=true]) {
    background-color:var(--brand)!important; color:var(--on-brand)!important;
    background-image:linear-gradient(var(--material-primary-wash),var(--material-primary-wash)),var(--material-canvas)!important;
    background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-primary-wash-blend)!important;
  }
}

html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui :is(.upload-overlay-bar>div,.reward-progress-fill,.cf-progress>span) {
  background-image:linear-gradient(var(--material-primary-wash),var(--material-primary-wash)),var(--material-canvas)!important;
  background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-primary-wash-blend)!important;
}

/* The platform's main browsing canvas must not be hidden by an opaque app face. */
html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui.feika-platform .shell>main  {
    background-color:var(--bg)!important;

  background-image:linear-gradient(var(--material-page-wash),var(--material-page-wash)),var(--material-canvas)!important;
  background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-blend)!important;
}
/* Detail faces and floating controls use the theme's main canvas too. */
html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui.feika-platform #gameView,
html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui.feika-platform #gameView .game-detail-tabs  {
    background-color:var(--bg)!important;

  background-image:linear-gradient(var(--material-page-wash),var(--material-page-wash)),var(--material-canvas)!important;
  background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-blend)!important;
}
html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui.feika-platform #gameView #gameDetailBackBtn  {
    background-color:var(--surface)!important;
   color:var(--text)!important;
  background-image:linear-gradient(var(--material-panel-wash),var(--material-panel-wash)),var(--material-canvas)!important;
  background-size:auto,var(--material-size) var(--material-size)!important; background-blend-mode:var(--material-blend)!important;
  border-color:var(--line)!important; text-shadow:none;
}
html:is([data-platform-theme=painted-light],[data-platform-theme=painted-dark]) body.feika-ui.feika-platform #libraryView .library-primary-action svg {
  color:inherit!important;
}

/* FEIKA shared design tokens. Pages own geometry; this is the single visual system.
   Never hard-code a white component face: embedded and dark pages replace tokens. */
:root {
  --fui-background:220 50% 98%; --fui-foreground:221 45% 17%;
  --fui-card:0 0% 100%; --fui-card-foreground:221 45% 17%;
  --fui-popover:0 0% 100%; --fui-popover-foreground:221 45% 17%;
  --fui-primary:217 81% 48%; --fui-primary-foreground:0 0% 100%;
  --fui-secondary:218 50% 97%; --fui-secondary-foreground:219 30% 31%;
  --fui-muted:220 40% 96%; --fui-muted-foreground:219 17% 45%;
  --fui-accent:217 100% 96%; --fui-accent-foreground:219 85% 46%;
  --fui-border:219 42% 92%; --fui-input:219 34% 89%; --fui-ring:218 100% 57%;
  --fui-destructive:351 68% 48%; --fui-destructive-foreground:0 0% 100%;
  --uk-global-font-size:14px; --uk-global-leading:1.6;
  --uk-global-font-family-sans:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --radius-control:10px; --radius-card:16px; --radius-dialog:20px;
  --uk-global-radius:var(--radius-control); --uk-btn-radius:var(--radius-control);
  --uk-form-input-radius:var(--radius-control); --uk-btn-font-size:13px; --uk-btn-font-weight:600;
  --uk-card-radius:var(--radius-card); --uk-card-shadow:var(--shadow-card);
  --uk-badge-font-size:11px; --uk-badge-font-weight:500; --uk-badge-box-shadow:none;
  --bg:#f6f8fd; --bg-2:#eef3fa; --surface:#fff; --panel:var(--surface); --panel-solid:var(--surface);
  --panel-2:#f8faff; --soft:#eff3f9; --text:#18243e; --muted:#5f6f88; --dim:#8390a5;
  --line:#e5ebf5; --line-soft:#edf1f8; --line-strong:#cfdcf0;
  --brand:#1764df; --brand-dark:#165bd8; --brand-soft:#eaf2ff; --brand-hover:#1764ea; --on-brand:#fff;
  --hover-bg:#eef4ff; --ink-1:var(--text); --ink-2:#405572; --ink-3:var(--muted); --ink-4:var(--dim);
  --line-1:var(--line); --line-2:var(--line-strong); --teal:#1764df; --sky:#428dff; --blue:#1764df;
  --green:#168655; --ok:#168655; --amber:#986315; --warn:#986315; --red:#bd344c; --danger:#bd344c;
  --success-soft:#e8f8f0; --warning-soft:#fff6e4; --danger-soft:#fff0f3;
  --shadow-card:0 4px 20px #30497606,0 1px 3px #30497603;
  --shadow-hover:0 10px 28px #30497610; --shadow-button:0 2px 6px #30497609;
  --shadow-dialog:0 24px 80px #20385c26; --shadow: #3049761a;
  --focus-ring:0 0 0 3px #1764df20; --scrim:#15284559;
  --admin-bg:var(--bg); --admin-ink:var(--text); --admin-muted:var(--muted); --admin-line:var(--line);
  --admin-accent:var(--brand); --admin-soft:var(--soft);
}
body.feika-ui { background:var(--bg); color:var(--text); font-family:var(--uk-global-font-family-sans); -webkit-font-smoothing:antialiased; }
body.feika-ui::before { background:var(--bg); }
body.feika-ui :is(button,input,select,textarea) { font-family:inherit; }
body.feika-ui button { text-shadow:none; filter:none; }
body.feika-ui button:hover { filter:none; }
body.feika-ui :is(button,a,summary,[tabindex]):focus { outline:none; box-shadow:none; }
body.feika-ui :is(button,a,summary,[tabindex]):focus-visible { text-decoration:underline; text-underline-offset:4px; }
body.feika-ui :is(input,select,textarea):focus-visible { outline:none; border-color:var(--line-strong); }
body.feika-ui :is(button,input,select,textarea):not(.ui-control):not([data-ui-control]):disabled { opacity:.55; cursor:not-allowed; }
body.feika-ui button:disabled:hover { transform:none; filter:none; box-shadow:none; }
body.feika-ui :is(.pill,.chip):not(.pill-tag):not(.pill-jump):not(button):hover { opacity:1; cursor:default; }
body.feika-ui [aria-busy=true] { cursor:progress; }
body.feika-ui :is(.tabs button.active,.tab.active,.nav-item.active,.inventory-tab.active,.scope button.active) { color:var(--brand); background:var(--brand-soft); border-color:transparent; }
body.feika-ui .tabs button { background:transparent; color:var(--muted); border-color:transparent; box-shadow:none; }
body.feika-ui .auth-panel .tabs button.active { background:var(--surface); box-shadow:var(--shadow-card); }
body.feika-ui :is(.nav-item.active svg,.section-head-title svg) { color:var(--brand); }
body.feika-ui :is(.muted,.hint,.meta,.desc) { color:var(--muted); }
body.feika-ui :is(.filter-bar,.section-banner,.config-card summary,.help-card) { background:var(--panel-2); border-color:var(--line); }
body.feika-ui .toolbar { background:transparent; }
body.feika-ui select { appearance:auto; -webkit-appearance:auto; background-image:none; padding-right:12px; }
body.feika-ui input:is([type=checkbox],[type=radio]) { width:16px; height:16px; min-height:0; padding:0; accent-color:var(--brand); flex:none; }
body.feika-ui input[type=file] { max-width:100%; height:auto; padding:6px; border:1px solid var(--line); border-radius:var(--radius-control); color:var(--muted); background:var(--surface); }
body.feika-ui input[type=file]::file-selector-button { margin-right:12px; padding:7px 12px; border:0; border-radius:7px; background:var(--brand-soft); color:var(--brand); font:inherit; }
body.feika-ui ::selection { background:var(--brand-soft); color:var(--text); }
body.feika-ui :is(.avatar,.user-avatar,.stat-icon,.system-icon,.inventory-icon) { background-color:var(--brand-soft); color:var(--brand); box-shadow:none; }
body.feika-ui :is(.card .value,.stat .value,.system-metric .value) { color:var(--text); font-variant-numeric:tabular-nums; letter-spacing:-.025em; }
body.feika-ui :is(h1,h2,h3) { letter-spacing:-.025em; }
body.feika-ui :is(th,td) { border-color:var(--line); }
body.feika-ui th { background:var(--panel-2); color:var(--muted); font-weight:600; }
body.feika-ui tbody tr:hover td { background:var(--hover-bg); }
body.feika-ui :is(.modal,.config-modal,.dialog) { border:1px solid var(--line); border-radius:var(--radius-dialog); box-shadow:var(--shadow-dialog); }
body.feika-ui .modal:has(>.modal-backdrop) { border:0; border-radius:0; box-shadow:none; }
body.feika-ui :is(.modal-card,.modal-dialog) { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-dialog); box-shadow:var(--shadow-dialog); }
body.feika-ui :is(.empty,.empty-cell,.loading) { color:var(--muted); }
body.feika-ui :is(.detail-button,.modal-close,.config-modal-close,.sidebar-toggle,.notification-btn) { box-shadow:none; }
body.feika-ui .detail-button { background:transparent; border:0; color:var(--text); }
body.feika-ui :is(.chip.ok,.pill.ok) { color:var(--ok); background:var(--success-soft); border-color:transparent; }
body.feika-ui :is(.chip.bad,.pill.bad,.chip.error) { color:var(--danger); background:var(--danger-soft); border-color:transparent; }
body.feika-ui :is(.pill.warn,.chip.warn) { color:var(--warn); background:var(--warning-soft); border-color:transparent; }
body.feika-ui button.danger { background:var(--danger-soft); color:var(--danger); border-color:transparent; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip-path:inset(50%)!important; white-space:nowrap!important; border:0!important; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; } }
