/*! /css/live-results.css */
#liveResultsOverlay{
  display:none; position:fixed; inset:0; background:rgba(20,24,32,0.45); z-index:var(--z-modal);
  align-items:center; justify-content:center;
}
#liveResultsOverlay.open{ display:flex; }
#liveResultsModal{
  width:980px; max-width:92vw; height:660px; max-height:88vh;
  background:var(--md-color-grey-white); border-radius:16px; box-shadow:var(--shadow-modal);
  display:flex; overflow:hidden; position:relative;
  animation:modal-rise-in .32s cubic-bezier(.2,.8,.2,1);
}
.lr-sidebar{ width:260px; flex-shrink:0; border-right:1px solid var(--ui-border); overflow-y:auto; padding:12px 10px; }
.lr-column{ flex:1; min-width:0; display:flex; flex-direction:column; min-height:0; }
.lr-header{ border-bottom:1px solid var(--ui-border); }
.lr-nav{ position:relative; }
.lr-nav-text{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.lr-nav-title{ font-size:var(--text-base); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lr-nav-meta{ font-size:var(--text-sm); color:var(--ui-muted); font-weight:normal; }
.lr-more-btn{
  flex-shrink:0; width:26px; height:26px; border-radius:6px; border:none; background:none;
  color:var(--ui-muted); display:flex; align-items:center; justify-content:center; font-size:var(--text-md);
  cursor:pointer; opacity:0; pointer-events:none; transition:opacity .1s;
}
.lr-nav:hover .lr-more-btn, .lr-more-btn.open{ opacity:1; pointer-events:auto; }
.lr-more-btn:hover, .lr-more-btn.open{ background:var(--ui-surface-2); color:var(--ui-text); }
.lr-menu{ position:fixed; right:auto; min-width:170px; z-index:2; }
.lr-main{ flex:1; min-width:0; overflow-y:auto; padding:20px 24px; display:flex; flex-direction:column; gap:16px; }
.lr-main-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.lr-main-meta{ font-size:var(--text-sm); color:var(--ui-muted); }
.lr-tabs{ display:inline-flex; gap:2px; padding:3px; border-radius:10px; background:var(--ui-surface-2); }
.lr-tab{ border:none; background:none; padding:6px 12px; border-radius:8px; font-family:var(--font-sans); font-size:var(--text-sm); color:var(--ui-text-2); cursor:pointer; }
.lr-tab.active{ background:var(--md-color-grey-white); color:var(--ui-text); font-weight:var(--font-weight-semibold); box-shadow:0 1px 2px rgba(0,0,0,.08); }
.lr-item{ display:flex; flex-direction:column; gap:10px; padding:16px; border:1px solid var(--ui-border); border-radius:12px; }
.lr-item-head{ display:flex; justify-content:space-between; gap:12px; font-size:var(--text-sm); color:var(--ui-muted); }
.lr-item-question{ margin:0; font-size:var(--text-lg); font-weight:var(--font-weight-semibold); color:var(--ui-text); }
.lr-item.is-old .lr-item-question{ color:var(--ui-text-2); }
.lr-item-question:has(> .lr-thumb){ display:flex; align-items:center; gap:10px; }
.lr-item-question > .lr-thumb{ width:40px; height:40px; }
.lr-stat{ margin:0; font-size:var(--text-base); font-weight:var(--font-weight-semibold); color:var(--ui-accent); }
.lr-row{ display:flex; flex-direction:column; gap:4px; }
.lr-row-head{ display:flex; justify-content:space-between; gap:12px; font-size:var(--text-base); color:var(--ui-text); }
.lr-row-label{ min-width:0; display:inline-flex; align-items:baseline; gap:8px; }
.lr-row-label b{ color:var(--ui-accent); }
.lr-thumb{ width:28px; height:28px; border-radius:6px; object-fit:cover; flex-shrink:0; align-self:center; }
.lr-row.is-correct .lr-row-label i{ color:var(--md-status-success-foreground-1-rest); }
.lr-row-value{ flex-shrink:0; color:var(--ui-text-2); font-variant-numeric:tabular-nums; }
.lr-bar{ height:8px; border-radius:4px; background:var(--ui-surface-2); overflow:hidden; }
.lr-bar span{ display:block; height:100%; border-radius:4px; background:var(--ui-accent); }
.lr-row.is-correct .lr-bar span{ background:var(--md-status-success-foreground-1-rest); }
.lr-words{ display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 14px; }
.lr-word{ color:var(--ui-text); line-height:1.3; }
.lr-word em{ font-style:normal; font-size:var(--text-sm); color:var(--ui-muted); }
.lr-muted{ margin:0; color:var(--ui-muted); font-size:var(--text-base); }
.lr-empty{ margin:auto; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; max-width:360px; }
.lr-empty i{ font-size:36px; color:var(--ui-muted); }
.lr-empty p{ margin:0; color:var(--ui-text); }
.lr-empty p.lr-muted{ color:var(--ui-muted); }
.lr-table-wrap{ overflow:auto; border:1px solid var(--ui-border); border-radius:12px; }
.lr-table{ border-collapse:collapse; width:100%; font-size:var(--text-sm); }
.lr-table th, .lr-table td{ padding:8px 10px; border-bottom:1px solid var(--ui-border); text-align:left; vertical-align:top; color:var(--ui-text); }
.lr-table th{ position:sticky; top:0; background:var(--ui-surface-2); font-weight:var(--font-weight-semibold); max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lr-table tr:last-child td{ border-bottom:none; }
.lr-table td.is-right{ color:var(--md-status-success-foreground-1-rest); }
.lr-table td.is-wrong{ color:var(--ui-danger); }
.lr-person{ font-weight:var(--font-weight-semibold); white-space:nowrap; }
.lr-points{ font-variant-numeric:tabular-nums; white-space:nowrap; }
.lr-footer{ border-top:1px solid var(--ui-border); align-items:center; }
.lr-export-split .split-main i{ margin-right:6px; }
@media (max-width: 720px){
  #liveResultsModal{ flex-direction:column; }
  .lr-sidebar{ width:auto; max-height:34%; border-right:none; border-bottom:1px solid var(--ui-border); }
  .lr-footer{ flex-wrap:wrap; }
}
/*! /css/home.css */

body.home-body{ background:var(--md-color-grey-white); }
.app-page-body{
  flex:1; min-width:0; background:var(--md-color-grey-white); border-radius:12px 0 0 0;
  overflow-x:hidden; overflow-y:auto;
  box-shadow:0 4px 24px rgba(var(--shadow-rgb),0.10), 0 8px 20px rgba(var(--shadow-rgb), 0.16);
}
html[data-ui-theme="dark"] .app-page-body::before{
  content:''; display:block; position:sticky; top:0; z-index:3; pointer-events:none;
  box-sizing:border-box; height:260px; margin-bottom:-260px;
  border-top:1px solid rgba(255,255,255,0.28);
  border-left:1px solid rgba(255,255,255,0.28);
  border-radius:12px 0 0 0;
  -webkit-mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,0) 100%), linear-gradient(to right, #000 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,0) 100%), linear-gradient(to right, #000 0%, rgba(0,0,0,0) 100%);
  mask-composite:intersect;
}

.home-main{ max-width:1280px; margin:0 auto; padding:48px 24px 64px; }
.decks-banner + .home-main{ padding-top:32px; }
.decks-banner + .home-main > .home-section:first-child{ margin-top:0; }

.home-hero{
  position:relative; width:100%; overflow:visible;
  min-height:360px; display:flex; align-items:center; justify-content:center;
  background:var(--md-neutral-background-2-rest);
  transition:border-radius .32s cubic-bezier(.4,0,.2,1);
}
.home-hero-bg{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; transition:opacity .22s ease; }
.home-hero-panel{
  position:relative; z-index:1; width:100%; max-width:640px; padding:32px 24px;
  transition:max-width .32s cubic-bezier(.4,0,.2,1);
}
.home-hero-leaving #homeGreeting,
.home-hero-leaving .home-input-mode-toggle,
.home-hero-leaving .home-hero-ctas-wrap{
  opacity:0; transform:translateY(-12px) scale(.98); pointer-events:none;
  transition:opacity .28s ease, transform .5s cubic-bezier(.22,1,.36,1);
}
.home-hero-leaving .home-input-panels{ pointer-events:none; }
.home-hero-leaving .home-hero-bg{
  opacity:0; transform:scale(1.06); filter:blur(6px);
  transition:opacity .4s ease, transform .6s cubic-bezier(.22,1,.36,1), filter .4s ease;
}
body.discovery-open .app-page-body{ overflow:hidden; }
.home-greeting{ display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:16px; transition:opacity .22s ease; }
.home-greeting-img{ width:36px; height:36px; flex-shrink:0; object-fit:contain; }
.home-greeting-text{ font-family:var(--font-display); font-size:var(--text-4xl); line-height:1.1; color:var(--md-neutral-foreground-3-rest); }
.home-input-mode-toggle{
  display:flex; width:fit-content; margin:0 auto 12px; padding:3px; gap:2px;
  background:rgba(255,255,255,0.75); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border:1px solid var(--ui-border); border-radius:8px;
}
.home-input-mode-btn{
  border:none; background:transparent; cursor:pointer; padding:5px 14px; border-radius:6px;
  font-family:var(--font-sans); font-size:var(--text-md); font-weight:var(--font-weight-medium); color:var(--md-neutral-foreground-3-rest);
  transition:background .15s ease, color .15s ease;
}
.home-input-mode-btn.active{ background:var(--md-color-grey-white); color:var(--ui-text); box-shadow:0 1px 3px rgba(var(--shadow-rgb),0.12); }
.home-generate-wrap{ position:relative; }
.home-input-panels{ display:grid; }
.home-input-panels > .home-input-panel{
  grid-area:1 / 1; min-width:0;
  transition:opacity .28s cubic-bezier(.4,0,.2,1), transform .28s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s;
}
.home-input-panels > .home-input-panel.is-off{
  opacity:0; transform:translateY(8px) scale(.985); pointer-events:none; visibility:hidden;
  transition:opacity .22s cubic-bezier(.4,0,.2,1), transform .22s cubic-bezier(.4,0,.2,1), visibility 0s linear .22s;
}
.home-generate-textarea{
  width:100%; min-height:120px; resize:none; box-sizing:border-box;
  font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-text);
  background:rgba(255,255,255,0.75); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border:1px solid var(--ui-border); border-radius:10px; padding:12px 44px 44px 12px;
  transition:min-height .16s ease, flex-basis .32s cubic-bezier(.4,0,.2,1), height .32s cubic-bezier(.4,0,.2,1),
    border-color .32s cubic-bezier(.4,0,.2,1), background .32s cubic-bezier(.4,0,.2,1);
}
.home-generate-textarea:focus{ outline:none; border-color:var(--ui-accent); min-height:160px; background:var(--md-color-grey-white); }
.home-generate-textarea::placeholder{ color:var(--ui-muted); }
.home-generate-placeholder{
  position:absolute; left:0; top:0; right:0; padding:13px 45px 45px 13px; box-sizing:border-box;
  font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-muted);
  pointer-events:none; white-space:pre-wrap; overflow:hidden; user-select:none; -webkit-user-select:none;
}
.home-generate-placeholder.hidden{ display:none; }
.home-ph-word{
  display:inline-block; opacity:0; transform:translateY(8px);
  transition:opacity .34s ease, transform .34s cubic-bezier(.2,.8,.2,1); will-change:opacity, transform;
}
.home-ph-word.in{ opacity:1; transform:translateY(0); }
.home-ph-word.in.out{ opacity:0; transform:translateY(-8px); transition-duration:.26s; }
.home-generate-submit{
  position:absolute; right:12px; bottom:14px; width:32px; height:32px; border-radius:12px;
  border:none; background:var(--ui-accent); color:var(--md-color-grey-white); font-size:var(--text-lg);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.home-generate-submit:hover{ opacity:0.9; }
.home-generate-submit:disabled{ background:var(--ui-border); color:var(--ui-muted); opacity:1; cursor:default; }
.home-generate-error{ display:block; min-height:15px; font-size:var(--text-md); color:var(--ui-danger); margin-top:8px; }

.home-hero-ctas-wrap{
  position:absolute; left:0; right:0; bottom:0; transform:translateY(50%); z-index:2;
  max-width:1280px; margin:0 auto; padding:0 24px; pointer-events:none;
  transition:opacity .2s ease;
}
.home-hero-ctas{ display:flex; gap:8px; pointer-events:auto; width:fit-content; padding: 10px; background: white; border-radius: 16px; box-shadow: 0 8px 20px rgba(var(--shadow-rgb), 0.16);}
.home-cta-primary, .home-cta-secondary{ padding:11px 20px; font-size:var(--text-lg); border-radius:12px;}
.home-cta-secondary{ background:var(--md-color-grey-white); border:1px solid var(--ui-border); color:var(--ui-text); font-family:var(--font-display);}
.home-cta-secondary:hover{ border-color:var(--ui-muted); }

.decks-banner{ position:relative; width:100%; height:160px; overflow:hidden; display:flex; align-items:center; }
.decks-banner-svg{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }

.home-section{ margin-top:40px; }
.home-section-header{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.home-section-header .home-section-title{ margin:0; }
.home-main-flush > .home-section:first-child{ margin-top:0; }
.home-section-title{ font-size:var(--text-2xl); font-weight:var(--font-weight-semibold); color:var(--ui-text); margin:0 0 14px; font-family:var(--font-display);}
.home-section-toolbar{ display:flex; align-items:center; gap:12px; height:56px; margin-bottom:14px; justify-content: space-between; }
.home-decks-search{ flex:0 0 auto; width:280px; max-width:450px; }
.home-section-toolbar > .home-decks-search + *,
.admin-toolbar-right > .home-decks-search + *{ margin-left:auto; }
.toolbar-dd{ position:relative; flex-shrink:0; }
.toolbar-dd-btn{
  position:relative;
  height:36px; padding:0 10px; display:inline-flex; align-items:center; gap:7px; cursor:pointer;
  border:1px solid var(--ui-border); border-radius:8px; background:none; color:var(--ui-text); font-size:var(--text-lg);
}
.toolbar-dd-btn:hover{ background:var(--md-neutral-background-2-rest); }
.toolbar-dd-btn .toolbar-dd-caret{ font-size:var(--text-sm); color:var(--ui-muted); }
.toolbar-dd-menu{ top:calc(100% + 6px); right:0; left:auto; min-width:196px; max-width:230px; }
#decksOwnerFilterMenu{ min-width:170px; }
.toolbar-dd-btn.has-value::after{
  content:''; position:absolute; top:5px; right:5px; width:7px; height:7px; border-radius:50%;
  background:var(--ui-accent);
}
.toolbar-dd-menu .view-menu-option{ justify-content:space-between; }
.toolbar-dd-menu .view-menu-check{ opacity:0; font-size:var(--text-md); color:var(--ui-accent); }
.toolbar-dd-menu .view-menu-option.active .view-menu-check{ opacity:1; }
.toolbar-dd-divider{ height:1px; background:var(--ui-border); margin:4px 0; }
.view-menu-check-option{
  display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:7px 10px;
  border:none; background:none; border-radius:6px; cursor:pointer;
  font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-text);
}
.view-menu-check-option:hover{ background:var(--md-neutral-background-2-rest); }
.view-menu-check-option .deck-select-checkbox{ display:flex; pointer-events:none; opacity:1; transform:scale(1); visibility:visible; }
.home-section-toolbar.hidden{ display:none; }
.home-section-toolbar[hidden]{ display:none; }

.home-section-toolbar .home-decks-search input{ height:36px; padding-top:0; padding-bottom:0; }
.deck-filter-pills button{ height:36px; padding:0 14px; }
.home-section-toolbar .select-mode-toggle{ width:36px; height:36px; }
.home-section-toolbar .cols-group{ height:36px; box-sizing:border-box; align-items:center; }
.home-section-toolbar .cols-group button{ height:30px; display:flex; align-items:center; justify-content:center; }

.home-section > .deck-filter-pills{ margin-bottom:12px; }
.deck-filter-pills{ display:flex; align-items:center; gap:6px; flex-shrink:0; flex-wrap:wrap; }
.deck-filter-pills button{
  border:1px solid var(--ui-border); background:var(--md-color-grey-white); color:var(--ui-text); cursor:pointer;
  font-family:var(--font-regular); font-size:var(--text-base); padding:7px 14px; border-radius:999px;
  transition:background .12s, border-color .12s;
}
.deck-filter-pills button:hover{ border-color:var(--ui-border-strong); color:var(--ui-text); background:var(--ui-surface-2); }
.deck-filter-pills button.active{ background:var(--ui-pill-active); border-color:var(--ui-pill-active); color:var(--ui-pill-active-fg); }
.deck-filter-pills button.active:hover{ background:var(--ui-pill-active); border-color:var(--ui-pill-active); color:var(--ui-pill-active-fg); }

.home-scroll-row{
  display:flex; gap:16px; overflow-x:auto; padding-bottom:8px; scroll-snap-type:x proximity;
  scrollbar-width:none;
}
.home-scroll-row::-webkit-scrollbar{ display:none; }
.home-scroll-row.hs-more-right{
  -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 80px), transparent);
  mask-image:linear-gradient(to right, #000 calc(100% - 80px), transparent);
}
.home-scroll-row.hs-more-left{
  -webkit-mask-image:linear-gradient(to right, transparent, #000 80px);
  mask-image:linear-gradient(to right, transparent, #000 80px);
}
.home-scroll-row.hs-more-left.hs-more-right{
  -webkit-mask-image:linear-gradient(to right, transparent, #000 80px, #000 calc(100% - 80px), transparent);
  mask-image:linear-gradient(to right, transparent, #000 80px, #000 calc(100% - 80px), transparent);
}
.home-scroll-row .layout-thumb{ flex:0 0 200px; scroll-snap-align:start; }
.home-scroll-row .layout-thumb-label{ text-align:left; font-weight:var(--font-weight-medium); }

.home-templates-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:16px;
}

.home-fav-btn{
  width:30px; height:30px; border-radius:8px; border:none; background:none;
  color:var(--ui-muted); display:flex; align-items:center; justify-content:center;
  font-size:var(--text-lg); cursor:pointer; opacity:0; transition:opacity .12s, color .12s;
}
.home-fav-btn i{ font-weight:var(--font-weight-regular); }
.home-fav-btn:hover i, .home-fav-btn.active i{ font-weight:var(--font-weight-black); }
.layout-thumb:hover .home-fav-btn, .home-fav-btn.active{ opacity:1; }
.selection-mode .layout-thumb:hover .home-fav-btn:not(.active){ opacity:0; pointer-events:none; }
.home-fav-btn:hover{ background:var(--ui-surface-2); }

.deck-presence-badge{ display:flex; }
.deck-presence-badge:not(:empty){ margin-right:2px; }
.deck-presence-badge .presence-avatar{ width:20px; height:20px; font-size:var(--text-2xs); border-width:1px; margin-left:-6px; }
.deck-presence-badge .presence-avatar:first-child{ margin-left:0; }
.home-fav-btn.active{ color:var(--md-neutral-foreground-1-rest); }

.home-deck-card{
  background:var(--md-color-grey-white); border:1px solid var(--ui-border); border-radius:12px; overflow:visible;
  display:flex; flex-direction:column; transition:box-shadow .15s; padding: 12px;
}
.home-deck-card:hover{ box-shadow:var(--shadow-sm); }
.home-deck-card .layout-thumb-frame{ border-radius:8px; border:none; }
.home-deck-card:hover .layout-thumb-frame{ border-color:transparent; box-shadow:none; }
.home-deck-card-info{ flex:1 1 auto; padding:10px 4px 4px; text-align:left; }
.home-deck-card-info .layout-thumb-label{ margin-top:0; text-align:left; font-family:var(--font-display);}
.home-deck-card-info .layout-thumb-count{ margin-top:2px; text-align:left; font-weight:var(--font-weight-light);}
.home-deck-card-info .layout-thumb-date{ display:block; margin-top:1px; text-align:left; font-size:var(--text-sm); font-weight:var(--font-weight-light); color:var(--md-neutral-foreground-3-rest); }
.home-deck-card-footer{ align-self:stretch; margin:8px 0 4px; min-height:1px; display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.home-deck-card-tags{ display:flex; align-items:center; gap:6px; margin-left:auto; min-width:0; }

.deck-card-link{ color:inherit; text-decoration:none; }
.deck-card-link::after{ content:''; position:absolute; inset:0; z-index:1; border-radius:inherit; }
.deck-card-link:focus-visible{ outline:none; }
.home-deck-card:has(.deck-card-link:focus-visible),
.deck-table-row:has(.deck-card-link:focus-visible){ outline:2px solid var(--ui-accent); outline-offset:2px; }
.home-deck-card .home-fav-btn,
.home-deck-card .deck-presence-badge,
.home-deck-card-tags > *,
.deck-table-row .deck-select-checkbox,
.deck-table-row .home-fav-btn,
.deck-table-row .admin-col-edit .layout-thumb-menu-btn,
.deck-table-row .admin-col-lang > *,
.deck-table-row .admin-col-team > *{ position:relative; z-index:2; }
.home-deck-card:has(.split-menu.open),
.deck-table-row:has(.split-menu.open){ z-index:3; }
.home-deck-card-info .layout-thumb-label{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere;
}
.layout-thumb:focus-within .home-fav-btn,
.layout-thumb:focus-within .layout-thumb-menu-btn,
.deck-table-row:focus-within .home-fav-btn,
.deck-table-row:focus-within .layout-thumb-menu-btn{ opacity:1; }

.deck-type-line{
  display:block; text-align:left; font-size:var(--text-md); color:var(--ui-muted);
  font-weight:var(--font-weight-light); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.home-deck-card-info .deck-type-line{ font-size:var(--text-sm); }
.admin-col-name .deck-type-line{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }
.admin-col-name .deck-card-link{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.home-decks-show-all{
  display:block; width:fit-content; margin:16px 0 0 auto; padding:9px 16px;
  border:none; background:none; color:var(--ui-accent); font-family:var(--font-sans);
  font-size:var(--text-base); font-weight:var(--font-weight-semibold); cursor:pointer; text-decoration:none; border-radius:8px; font-family:var(--font-display);
}
.home-decks-show-all:hover{ background:var(--ui-surface-2); }
.home-decks-show-all.hidden{ display:none; }

.select-mode-toggle{
  width:32px; height:32px; flex-shrink:0; border:1px solid var(--ui-border); background:var(--md-color-grey-white);
  border-radius:8px; color:var(--ui-text); font-size:var(--text-base); cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background .12s, border-color .12s;
}
.select-mode-toggle:hover{ border-color:var(--ui-accent); color:var(--ui-accent); }
.select-mode-toggle.active{ background:var(--ui-accent); border-color:var(--ui-accent); color:var(--md-color-grey-white); }

.deck-select-checkbox{
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  width:20px; height:20px; border-radius:5px; border:1.5px solid var(--ui-border); background:var(--md-color-grey-white);
  color:transparent; font-size:var(--text-sm); cursor:pointer;
  opacity:0; transform:scale(.5); pointer-events:none;
  visibility:hidden;
  transition:background .12s, border-color .12s, opacity .2s ease, transform .2s ease, visibility .2s;
}
.deck-select-checkbox.checked{ background:var(--ui-accent); border-color:var(--ui-accent); color:var(--md-color-grey-white); }
.home-deck-card .deck-select-checkbox{
  position:absolute; top:8px; left:8px; z-index:2; box-shadow:0 0 0 2px var(--md-color-grey-white);
}
#decksGrid.selection-mode .deck-select-checkbox,
#templatesGrid.selection-mode .deck-select-checkbox{ opacity:1; transform:scale(1); pointer-events:auto; visibility:visible; }
#decksGrid.selection-mode .layout-thumb-menu-btn,
#templatesGrid.selection-mode .layout-thumb-menu-btn{ opacity:0; pointer-events:none; }
.home-deck-card.selected{
  background:var(--md-brand-background-1-rest);
}
.home-deck-card.is-readonly .layout-thumb-frame{ filter:grayscale(1); opacity:.55; }
.home-deck-card.is-readonly .layout-thumb-label{ color:var(--ui-muted); }
.deck-readonly-tag{
  display:inline-flex; align-items:center; gap:4px; height:24px; box-sizing:border-box;
  padding:0 10px 0 8px; border-radius:6px;
  border:1px solid var(--ui-border); color:var(--ui-muted); background:var(--ui-surface-2);
  font-size:var(--md-typography-font-size-300); line-height:16px;
  font-weight:var(--font-weight-semibold); white-space:nowrap;
}
.deck-readonly-tag i{ font-size:var(--md-typography-font-size-300); }
.deck-readonly-tag.is-compact{ width:24px; padding:0; justify-content:center; gap:0; }
#decksGrid.selection-mode .is-readonly,
#templatesGrid.selection-mode .is-readonly{ opacity:.6; cursor:not-allowed; }
#decksGrid.selection-mode .is-readonly .deck-select-checkbox,
#templatesGrid.selection-mode .is-readonly .deck-select-checkbox{ display:none; }

.decks-selection-bar{
  position:sticky; top:14px; z-index:20; height:56px; box-sizing:border-box;
  display:flex; align-items:center; gap:4px; padding:0 14px; margin-bottom:14px; background:var(--md-color-grey-white);
  border-radius:12px; box-shadow:0 4px 12px rgba(var(--shadow-rgb),0.10);
}
html[data-ui-theme="dark"] .decks-selection-bar{ box-shadow:0 10px 28px rgba(0,0,0,0.6), 0 0 0 1px var(--ui-border); }
.decks-selection-action{
  display:flex; align-items:center; gap:8px; padding:9px 14px; border:none; background:none;
  border-radius:9px; font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-text); cursor:pointer;
}
.decks-selection-action:hover{ background:var(--ui-surface-2); }
.decks-selection-action:disabled{ opacity:.45; cursor:not-allowed; background:none; }
.decks-selection-download-wrap{ position:relative; }
.decks-selection-download-menu{ bottom:calc(100% + 6px); top:auto; min-width:150px; }
.decks-selection-download-wrap.open .decks-selection-download-menu{ display:block; }
.decks-selection-bar-spacer{ flex:1; }
.decks-selection-clear{
  display:flex; align-items:center; gap:8px; padding:9px 14px; border:1px solid var(--ui-border);
  background:var(--md-color-grey-white); border-radius:9px; font-family:var(--font-sans); font-size:var(--text-base);
  color:var(--ui-text); cursor:pointer; white-space:nowrap;
}
.decks-selection-clear:hover{ background:var(--ui-surface-2); }
#decksViewToggleFloating{ margin-left:2px; }

.home-templates-empty{
  grid-column:1 / -1; display:flex; flex-direction:column; align-items:center; gap:10px;
  padding:40px 20px; color:var(--ui-muted); font-size:var(--text-base); text-align:center;
}
.home-templates-empty img{ width:100px; height:100px; }
.home-templates-empty-title{ color:var(--ui-text); font-size:var(--text-lg); font-weight:var(--font-weight-semibold); }
.home-templates-empty-actions{ display:flex; gap:8px; }
.home-templates-empty-hint{ color:var(--ui-muted); font-size:var(--text-base); max-width:420px; }
.layout-thumb-desc{
  font-size:var(--text-sm); color:var(--ui-muted); line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.library-image-thumb-img{ width:100%; height:100%; object-fit:contain; display:block; background:var(--ui-surface-2); }

@media (max-width:640px){
  .home-hero{ min-height:auto; }
  .home-hero-panel{ padding:24px 16px; }
  .home-hero-ctas-wrap{ padding:0 16px; }
  .home-scroll-row .layout-thumb{ flex-basis:240px; }
}

.home-code-editor{
  position:relative; display:flex; align-items:stretch; width:100%; height:120px; box-sizing:border-box;
  background:rgba(255,255,255,0.75); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border:1px solid var(--ui-border); border-radius:10px; overflow:hidden;
  transition:height .16s ease, border-color .16s ease, box-shadow .2s ease, background .32s cubic-bezier(.4,0,.2,1);
}
.home-code-editor:focus-within{ border-color:var(--ui-accent); height:160px; background:var(--md-color-grey-white); }
.home-code-gutter{
  flex:0 0 auto; min-width:40px; padding:12px 8px 12px 12px; box-sizing:border-box;
  background:var(--ui-surface-2); border-right:1px solid var(--ui-border);
  overflow:hidden; text-align:right; user-select:none;
}
.home-code-gutter span{ display:block; color:var(--ui-muted); }
.home-code-scroll{ position:relative; flex:1 1 auto; min-width:0; overflow:hidden; }
.home-code-highlight,
.home-code-input,
.home-code-gutter{
  font-family:var(--font-mono);
  font-size:var(--text-md); line-height:18px; tab-size:2;
}
.home-code-highlight,
.home-code-input{
  margin:0; padding:12px 12px 44px; box-sizing:border-box;
  white-space:pre; word-wrap:normal; overflow-wrap:normal;
}
.home-code-highlight{
  position:absolute; inset:0; pointer-events:none; overflow:visible;
  color:var(--ui-text); will-change:transform;
}
.home-code-input{
  position:relative; width:100%; height:100%; display:block; resize:none;
  background:transparent; border:none; outline:none; overflow:auto;
  color:transparent; caret-color:var(--ui-text);
}
.home-code-input::selection{ background:rgba(0,64,222,0.18); }
.home-code-input::placeholder{ color:var(--ui-muted); }
.home-code-input:placeholder-shown{ white-space:pre-wrap; overflow-x:hidden; }
.home-code-highlight .tok-key{ color:var(--ui-accent); }
.home-code-highlight .tok-str{ color:var(--md-color-teal-700); }
.home-code-highlight .tok-num{ color:var(--md-color-orange-700); }
.home-code-highlight .tok-lit{ color:#A1244C; }

.home-code-actions{
  position:absolute; left:12px; right:12px; bottom:14px; display:flex; align-items:center; gap:8px;
  pointer-events:none;
}
.home-code-actions > *{ pointer-events:auto; }
.home-code-actions .home-generate-submit{ position:static; }
.home-code-status{ flex:1 1 auto; min-width:0; font-size:var(--text-md); color:var(--ui-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.home-code-status.ok{ color:var(--md-color-teal-700); }
.home-code-status.warn{ color:var(--md-color-orange-700); }
.home-code-status.bad{ color:var(--ui-danger); }

.home-code-editor::before,
.home-sweep::before{
  content:''; position:absolute; left:0; right:0; top:0; height:2px; z-index:2; pointer-events:none;
  background:linear-gradient(90deg, transparent, var(--ui-accent), transparent) no-repeat;
  background-size:40% 100%; background-position:-70% 0;
  opacity:0; transition:opacity .2s ease;
}
.home-sweep::before{ left:10px; right:10px; }
.home-code-editor.is-checking,
.home-code-editor.is-checking:focus-within,
.home-sweep.is-sweeping .home-generate-textarea{ border-color:color-mix(in srgb, var(--ui-accent) 65%, var(--ui-border)); }
.home-code-editor.is-checking::before,
.home-sweep.is-sweeping::before{ opacity:1; animation:home-code-sweep 1.1s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes home-code-sweep{ from{ background-position:-70% 0; } to{ background-position:170% 0; } }
.home-code-editor.is-success,
.home-code-editor.is-success:focus-within{
  border-color:var(--ui-success); box-shadow:0 0 0 3px color-mix(in srgb, var(--ui-success) 18%, transparent);
}
.home-code-editor.is-error,
.home-code-editor.is-error:focus-within{
  border-color:var(--ui-danger); box-shadow:0 0 0 3px color-mix(in srgb, var(--ui-danger) 14%, transparent);
}
.home-code-editor.is-shaking{ animation:home-code-shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes home-code-shake{
  0%, 100%{ transform:translateX(0); }
  20%{ transform:translateX(-6px); }
  40%{ transform:translateX(5px); }
  60%{ transform:translateX(-3px); }
  80%{ transform:translateX(2px); }
}
.home-generate-submit.is-loading,
.home-generate-submit.is-loading:disabled{ background:var(--ui-accent); color:var(--md-color-grey-white); cursor:progress; }
.home-generate-submit.is-loading i{ display:none; }
.home-generate-submit.is-loading::after{
  content:''; width:14px; height:14px; box-sizing:border-box; border-radius:50%;
  border:2px solid color-mix(in srgb, currentColor 35%, transparent); border-top-color:currentColor;
  animation:decks-scroll-spin .7s linear infinite;
}
.home-generate-submit.is-success,
.home-generate-submit.is-success:disabled{ background:var(--ui-success); color:var(--md-color-grey-white); }
.home-generate-submit.is-success i{ animation:home-code-pop .32s cubic-bezier(.22,1,.36,1); }
@keyframes home-code-pop{ from{ transform:scale(.4); opacity:0; } to{ transform:none; opacity:1; } }

.home-generate-error{ position:relative; }
.home-hero-panel:has(.home-code-callout){ z-index:3; }
.home-code-callout{
  position:absolute; top:0; left:0; right:0; z-index:4; box-sizing:border-box;
  display:flex; align-items:flex-start; gap:10px; padding:12px 14px;
  background:color-mix(in srgb, var(--ui-danger) 5%, var(--ui-surface));
  border:1px solid color-mix(in srgb, var(--ui-danger) 32%, var(--ui-border)); border-radius:10px;
  box-shadow:var(--shadow-sm); color:var(--ui-text); text-align:left;
  animation:home-code-callout-in .24s cubic-bezier(.22,1,.36,1);
}
@keyframes home-code-callout-in{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.home-code-callout-icon{ flex:0 0 auto; margin-top:2px; font-size:var(--text-lg); color:var(--ui-danger); }
.home-code-callout-body{ flex:1 1 auto; min-width:0; }
.home-code-callout-title{ margin:0 0 4px; font-size:var(--text-base); font-weight:var(--font-weight-semibold); color:var(--ui-text); }
.home-code-callout-message{ margin:0; font-size:var(--text-md); line-height:1.45; color:var(--ui-text); }
.home-code-callout-list{
  margin:0; padding:0 4px 0 18px; list-style:disc outside; max-height:168px; overflow-y:auto; overscroll-behavior:contain;
  font-size:var(--text-md); line-height:1.45; color:var(--ui-text-2);
}
.home-code-callout-list li{ margin:2px 0; overflow-wrap:anywhere; }
.home-code-callout-list li::marker{ color:var(--ui-danger); }
.home-code-sr{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
}
@media (prefers-reduced-motion: reduce){
  .home-code-editor.is-checking::before,
  .home-sweep.is-sweeping::before{ animation:none; background-size:100% 100%; background-position:0 0; opacity:.6; }
  .home-code-editor.is-shaking{ animation:none; }
  .home-generate-submit.is-loading::after{ animation:none; }
  .home-generate-submit.is-success i,
  .home-code-callout{ animation:none; }
}

.decks-scroll-sentinel{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:24px 0; font-size:var(--text-md); color:var(--ui-muted);
}
.decks-scroll-spinner{
  width:14px; height:14px; border-radius:50%; flex:0 0 auto;
  border:2px solid var(--ui-border); border-top-color:var(--ui-accent);
  animation:decks-scroll-spin .7s linear infinite;
}
@keyframes decks-scroll-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .decks-scroll-spinner{ animation-duration:2s; } }

html[data-ui-theme="dark"] .home-hero-bg{ opacity:0.22; }
html[data-ui-theme="dark"] .home-generate-textarea{ background:rgba(26,31,39,0.82); }
html[data-ui-theme="dark"] .home-input-mode-toggle, html[data-ui-theme="dark"] .home-code-editor{ background:rgba(26,31,39,0.82); }
html[data-ui-theme="dark"] .home-input-mode-btn.active{ background:var(--ui-surface-2); }
html[data-ui-theme="dark"] .home-code-highlight .tok-lit{ color:#E58AA8; }
html[data-ui-theme="dark"] .home-code-input::selection{ background:rgba(107,138,247,0.28); }
html[data-ui-theme="dark"] .home-generate-textarea:focus{ background:var(--ui-surface); }
html[data-ui-theme="dark"] .home-hero-ctas{ background:var(--ui-surface); }
html[data-ui-theme="dark"] .home-input-mode-toggle{ background:rgba(26,31,39,0.82); }
html[data-ui-theme="dark"] .home-input-mode-btn.active{ background:var(--ui-surface-2); color:var(--ui-text); box-shadow:0 0 0 1px rgba(255,255,255,0.06); }

.home-decks-table{ display:block; }
.home-decks-table .trash-table{ margin-top:4px; }
.trash-row.deck-table-row{
  grid-template-columns:0px 76px minmax(140px,1.6fr) 130px 96px 108px 128px 96px 104px 84px; cursor:pointer; align-items:center; position:relative;
  transition:grid-template-columns .22s ease; min-width:1086px;
}
.trash-row.deck-table-row.has-author{ grid-template-columns:0px 76px minmax(140px,1.6fr) 130px 130px 96px 108px 128px 96px 104px 84px; min-width:1228px; }
#decksGrid.selection-mode .trash-row.deck-table-row{ grid-template-columns:28px 76px minmax(140px,1.6fr) 130px 96px 108px 128px 96px 104px 84px; min-width:1114px; }
#decksGrid.selection-mode .trash-row.deck-table-row.has-author{ grid-template-columns:28px 76px minmax(140px,1.6fr) 130px 130px 96px 108px 128px 96px 104px 84px; min-width:1256px; }
.deck-share-tag{
  display:inline-flex; align-items:center; gap:6px; min-width:0;
  font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.deck-share-tag i{ font-size:var(--text-sm); flex-shrink:0; }
.trash-row-header .admin-col-share{ color:var(--ui-muted); }
.admin-col-share{ min-width:0; overflow:hidden; }
.deck-table-row .admin-col-author,
.deck-table-row .admin-col-opened,
.template-table-row .admin-col-author{
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color);
}
.trash-row-header .admin-col-author,
.trash-row-header .admin-col-opened{ color:var(--ui-muted); }
.deck-table-row .admin-col-select{ display:flex; align-items:center; overflow:hidden; }
.trash-table .trash-row-header.deck-table-row{ cursor:default; }
.trash-row-header .admin-col-name-head{ grid-column:span 2; }
.deck-table-thumb{
  width:64px; aspect-ratio:16/9; border:1px solid var(--ui-border); border-radius:6px;
  overflow:hidden; background:var(--frame-bg); position:relative; flex-shrink:0;
}
.deck-table-row.is-readonly > :not(.admin-col-edit),
.deck-table-row.is-readonly .admin-col-edit > :not(.split-menu){ opacity:.65; }
.deck-table-row .admin-col-edit{ display:flex; align-items:center; gap:2px; justify-content:flex-end; position:relative; }
.deck-table-row .home-fav-btn{ opacity:0; }
.deck-table-row:hover .home-fav-btn,
.deck-table-row .home-fav-btn.active{ opacity:1; }
.deck-table-row .admin-col-edit .layout-thumb-menu-btn,
.template-table-row .admin-col-edit .layout-thumb-menu-btn{ position:static; }
.deck-table-row:hover .layout-thumb-menu-btn,
.deck-table-row .layout-thumb-menu-btn.open,
.template-table-row:hover .layout-thumb-menu-btn,
.template-table-row .layout-thumb-menu-btn.open{ opacity:1; }
#decksGrid.selection-mode .deck-table-row:hover .home-fav-btn,
#decksGrid.selection-mode .deck-table-row .home-fav-btn,
#templatesGrid.selection-mode .template-table-row:hover .home-fav-btn,
#templatesGrid.selection-mode .template-table-row .home-fav-btn{ opacity:0; pointer-events:none; }
.trash-row.template-table-row{
  grid-template-columns:0px 76px minmax(140px,1.6fr) 130px minmax(120px,1fr) 108px var(--lang-col,0px) 104px 84px; cursor:pointer; align-items:center;
  transition:grid-template-columns .22s ease; min-width:calc(920px + var(--lang-col,0px));
}
.trash-row.template-table-row.has-author{ grid-template-columns:0px 76px minmax(140px,1.6fr) 130px 130px minmax(120px,1fr) 108px var(--lang-col,0px) 104px 84px; min-width:calc(1016px + var(--lang-col,0px)); }
#templatesGrid.selection-mode .trash-row.template-table-row{ grid-template-columns:28px 76px minmax(140px,1.6fr) 130px minmax(120px,1fr) 108px var(--lang-col,0px) 104px 84px; min-width:calc(948px + var(--lang-col,0px)); }
#templatesGrid.selection-mode .trash-row.template-table-row.has-author{ grid-template-columns:28px 76px minmax(140px,1.6fr) 130px 130px minmax(120px,1fr) 108px var(--lang-col,0px) 104px 84px; min-width:calc(1044px + var(--lang-col,0px)); }
.trash-row.template-table-row.has-lang{ --lang-col:96px; }
@media (max-width: 900px){
  .trash-row.template-table-row.has-lang{ --lang-col:84px; }
}
.admin-col-lang{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }
.trash-row-header .admin-col-lang{ color:var(--ui-muted); }
.deck-mini-tag{
  display:inline-flex; align-items:center; justify-content:center; gap:4px; flex-shrink:0;
  height:24px; min-width:24px; padding:0 6px; border-radius:6px;
  background:var(--md-neutral-background-2-rest); color:var(--ui-muted);
  font-size:var(--text-xs); font-weight:var(--font-weight-medium); letter-spacing:.02em;
}
.deck-mini-tag i{ font-size:var(--text-sm); }
.deck-version-tags{ display:inline-flex; align-items:center; gap:4px; flex-shrink:0; vertical-align:middle; }
.deck-mini-tag.is-current{ background:var(--ui-accent-soft); color:var(--ui-accent); }
.deck-version-tag{
  background:none; box-shadow:inset 0 0 0 1px var(--ui-border); color:var(--ui-text-2);
  text-decoration:none; cursor:pointer; transition:color .12s ease, box-shadow .12s ease;
}
.deck-version-tag:hover{ color:var(--ui-accent); box-shadow:inset 0 0 0 1px var(--ui-accent); }
.admin-col-lang .deck-mini-tag{ height:22px; min-width:22px; padding:0 5px; }
.template-table-row .admin-col-select{ display:flex; align-items:center; overflow:hidden; }
.trash-table .trash-row-header.template-table-row{ cursor:default; }
.template-table-row .admin-col-edit{ display:flex; align-items:center; gap:2px; justify-content:flex-end; position:relative; }
.template-table-row .home-fav-btn{ opacity:0; }
.template-table-row:hover .home-fav-btn,
.template-table-row .home-fav-btn.active{ opacity:1; }
.template-table-thumb{
  width:64px; aspect-ratio:16/9; border:1px solid var(--ui-border); border-radius:6px;
  overflow:hidden; background:var(--frame-bg); position:relative; flex-shrink:0;
}
.template-table-thumb > img{ width:100%; height:100%; object-fit:contain; display:block; }
@media (max-width: 900px){
  .trash-row.deck-table-row{ grid-template-columns:0px 64px minmax(140px,1.4fr) 110px 76px 120px 120px 84px 96px 72px; min-width:1006px; }
  #decksGrid.selection-mode .trash-row.deck-table-row{ grid-template-columns:28px 64px minmax(140px,1.4fr) 110px 76px 120px 120px 84px 96px 72px; min-width:1034px; }
  .trash-row.deck-table-row.has-author{ grid-template-columns:0px 64px minmax(140px,1.4fr) 110px 120px 76px 120px 120px 84px 96px 72px; min-width:1138px; }
  #decksGrid.selection-mode .trash-row.deck-table-row.has-author{ grid-template-columns:28px 64px minmax(140px,1.4fr) 110px 120px 76px 120px 120px 84px 96px 72px; min-width:1166px; }
  .trash-row.template-table-row{ grid-template-columns:0px 64px minmax(140px,1.4fr) 110px minmax(120px,1fr) 120px var(--lang-col,0px) 96px 72px; min-width:calc(834px + var(--lang-col,0px)); }
  #templatesGrid.selection-mode .trash-row.template-table-row{ grid-template-columns:28px 64px minmax(140px,1.4fr) 110px minmax(120px,1fr) 120px var(--lang-col,0px) 96px 72px; min-width:calc(862px + var(--lang-col,0px)); }
  .trash-row.template-table-row.has-author{ grid-template-columns:0px 64px minmax(140px,1.4fr) 110px 120px minmax(120px,1fr) 120px var(--lang-col,0px) 96px 72px; min-width:calc(966px + var(--lang-col,0px)); }
  #templatesGrid.selection-mode .trash-row.template-table-row.has-author{ grid-template-columns:28px 64px minmax(140px,1.4fr) 110px 120px minmax(120px,1fr) 120px var(--lang-col,0px) 96px 72px; min-width:calc(994px + var(--lang-col,0px)); }
}

.image-viewer{
  display:none; position:fixed; inset:0; z-index:var(--z-viewer);
  background:rgba(12,14,20,0.92);
  flex-direction:column;
}
.image-viewer.open{ display:flex; }
body.image-viewer-open{ overflow:hidden; }
.image-viewer-bar{
  display:flex; align-items:center; gap:12px; flex-shrink:0;
  padding:12px 16px; color:#fff;
}
.image-viewer-bar-side{ display:flex; align-items:center; gap:6px; flex:1 1 0; min-width:0; }
.image-viewer-bar-right{ justify-content:flex-end; }
.image-viewer-divider{ width:1px; height:20px; margin:0 4px; background:rgba(255,255,255,0.25); flex-shrink:0; }
.image-viewer-name{
  flex:0 1 auto; min-width:0; text-align:center;
  font-family:var(--font-sans); font-size:var(--text-base); font-weight:var(--font-weight-semibold);
  color:#fff;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.image-viewer .icon-btn, .image-viewer .btn{ color:#fff; }
.image-viewer .icon-btn{ background:rgba(255,255,255,0.10); }
.image-viewer .icon-btn:hover{ background:rgba(255,255,255,0.26); color:#fff; }
.image-viewer .btn{ background:rgba(255,255,255,0.14); border-color:rgba(255,255,255,0.38); }
.image-viewer .btn:hover{ background:rgba(255,255,255,0.28); border-color:rgba(255,255,255,0.55); color:#fff; }
.image-viewer-stage{
  flex:1 1 auto; min-height:0; display:flex; align-items:center; justify-content:center;
  padding:0 72px 32px;
}
.image-viewer-stage img{ max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; display:block; }
.image-viewer-nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:1;
  width:44px; height:44px; font-size:var(--text-xl);
  background:rgba(255,255,255,0.10);
}
.image-viewer-prev{ left:16px; }
.image-viewer-next{ right:16px; }
@media (max-width: 720px){
  .image-viewer-stage{ padding:0 12px 24px; }
  .image-viewer-bar{ flex-wrap:wrap; }
  .image-viewer-name{ order:3; flex:1 1 100%; text-align:left; }
}

.home-deck-card-tags .tag{ margin:0; }
/*! /css/app-nav.css */
.app-row{ flex:1; display:flex; min-height:0; }
.app-nav{
  width:64px; height:100%; flex-shrink:0;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  background:var(--md-color-grey-white);
	padding-bottom: 16px;
}
.app-nav-divider{ width:32px; height:1px; background:var(--ui-border); margin:2px 0 8px; flex-shrink:0; }
.app-nav-divider + .app-nav-divider{ display:none; }
.app-nav-divider + #appNavAfterNotif + .app-nav-divider{ display:none; }
.app-nav-avatar, .personal-info-avatar-wrap span, .avatar-color-option, .share-modal-member-avatar, .presence-avatar{ color:#fff; }
img[src^="/assets/avatar-emoji/"][src*="#"]{ background-color:#0040DE; object-fit:cover; }
img[src^="/assets/avatar-emoji/"][src$="#E08A2E" i]{ background-color:#E08A2E; }
img[src^="/assets/avatar-emoji/"][src$="#1B9E6B" i]{ background-color:#1B9E6B; }
img[src^="/assets/avatar-emoji/"][src$="#C4396A" i]{ background-color:#C4396A; }
img[src^="/assets/avatar-emoji/"][src$="#7B5CE0" i]{ background-color:#7B5CE0; }
img[src^="/assets/avatar-emoji/"][src$="#2E9AC4" i]{ background-color:#2E9AC4; }
img[src^="/assets/avatar-emoji/"][src$="#2F353E" i]{ background-color:#2F353E; }
.app-nav-item{
  display:flex; flex-direction:column; align-items:center; gap:4px; width:52px; box-sizing:border-box;
  padding:1px 6px 10px; background:none; border:none; cursor:pointer; text-decoration:none; line-height:normal;
  font-family:var(--font-sans); font-size:var(--text-2xs); font-weight:var(--font-weight-light); color:var(--ui-muted);
}
.app-nav-icon{ position:relative; width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.app-nav-icon i{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:var(--text-2xl); color:var(--ui-muted); }
.app-nav-icon i.fa-solid{ opacity:0; }
.app-nav-item:hover .app-nav-icon{ background:var(--md-neutral-background-2-rest); }
.app-nav-item.active .app-nav-icon{ background:var(--ui-accent); }
.app-nav-item.active .app-nav-icon i.fa-regular{ opacity:0; }
.app-nav-item.active .app-nav-icon i.fa-solid{ opacity:1; color:var(--md-color-grey-white); }
.app-nav-item.active{ color:var(--ui-accent); }

.app-nav.saving .app-nav-item{ pointer-events:none; }
.app-nav-item.saving .app-nav-icon{ background:var(--ui-accent); }
.app-nav-item.saving .app-nav-icon i{ opacity:0; }
.app-nav-item.saving .app-nav-icon::after{
  content:''; position:absolute; inset:9px; border-radius:50%;
  border:2px solid rgba(255,255,255,0.4); border-top-color:var(--md-color-grey-white);
  animation:app-nav-spin .6s linear infinite;
}
@keyframes app-nav-spin{ to{ transform:rotate(360deg); } }

.app-nav-avatar-wrap{ position:relative; margin-top:auto; }
.app-nav-avatar{
  width:36px; height:36px; border-radius:50%; border:none; cursor:pointer;
  background:var(--ui-accent); color:#fff; font-family:var(--font-display);
  font-size:var(--text-lg); font-weight:400; display:flex; align-items:center; justify-content:center;
  overflow:hidden; padding:0;
}
.app-nav-avatar img{ width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.app-nav-avatar-wrap .split-menu.rail-avatar-menu{
  top:auto; right:auto; bottom:0; left:calc(100% + 8px); min-width:160px;
}


body.no-perm-create [data-perm="create"],
body.no-perm-comment [data-perm="comment"],
body.no-perm-delete [data-perm="delete"],
body.no-perm-export [data-perm="export"],
body.no-perm-ai [data-perm="ai"],
body.no-perm-publish [data-perm="publish"],
body.no-perm-sharePublic [data-perm="sharePublic"],
body.no-perm-moderate [data-perm="moderate"],
body.no-perm-inviteUsers [data-perm="inviteUsers"],
body.no-perm-manageTeams [data-perm="manageTeams"],
body.no-perm-manageCategories [data-perm="manageCategories"],
body.no-perm-animations [data-perm="animations"]{ display:none !important; }
body.not-deck-owner [data-owner-only]{ display:none !important; }

.app-nav-icon{ position:relative; }
.app-nav-warn-dot{
  position:absolute; top:-2px; right:-4px; width:8px; height:8px; border-radius:50%;
  background:var(--yellow-500); box-shadow:0 0 0 2px var(--md-color-grey-white);
}
/*! /css/notifications.css */
.app-nav-notif{ position:relative; }
.app-nav-avatar-wrap{ order:10; }
.app-nav-badge{
  position:absolute; top:-2px; right:-4px; min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:var(--ui-danger); color:#FFFFFF; font-size:10px; font-weight:var(--font-weight-semibold); line-height:18px;
  text-align:center; box-shadow:0 0 0 2px var(--md-color-grey-white); pointer-events:none; z-index:1;
}
.app-nav-badge[hidden]{ display:none; }

.notif-panel:focus{ outline:none; }
.notif-panel{
  position:fixed; left:72px; top:12px; bottom:12px; width:400px; max-width:calc(100vw - 84px); z-index:var(--z-notifications);
  display:flex; flex-direction:column; background:var(--ui-surface); border:1px solid var(--ui-border);
  border-radius:16px; box-shadow:var(--shadow-raised); overflow:hidden;
  animation:notif-panel-in .22s cubic-bezier(.2,.8,.2,1);
  font-family:var(--font-sans); color:var(--ui-text);
}
.notif-panel[hidden]{ display:none; }
@keyframes notif-panel-in{ from{ opacity:0; transform:translateX(-8px); } to{ opacity:1; transform:none; } }

.notif-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 20px 8px 20px; }
.notif-head h2{ margin:0; font-size:var(--text-xl); font-weight:var(--font-weight-semibold); }
.notif-tabs{ display:flex; gap:4px; padding:0 12px; border-bottom:1px solid var(--ui-border); }
.notif-tab{
  border:none; background:none; cursor:pointer; padding:8px 10px 10px; font-family:inherit; font-size:var(--text-md);
  color:var(--ui-muted); position:relative;
}
.notif-tab.active{ color:var(--ui-text); font-weight:var(--font-weight-semibold); }
.notif-tab.active::after{ content:''; position:absolute; left:8px; right:8px; bottom:-1px; height:2px; border-radius:2px; background:var(--ui-text); }
.notif-toolbar{ display:flex; align-items:center; justify-content:space-between; padding:10px 16px 6px; }
.notif-chips{ display:flex; gap:6px; }
.notif-chip{
  display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 10px; border-radius:14px; cursor:pointer;
  border:1px dashed var(--ui-border-strong); background:none; color:var(--ui-text-2); font-family:inherit; font-size:var(--text-sm);
}
.notif-chip i{ font-size:var(--text-sm); }
.notif-chip:hover{ background:var(--md-neutral-background-2-rest); }
.notif-chip.active{ border-style:solid; border-color:var(--ui-accent); color:var(--ui-accent); background:var(--ui-accent-soft); }
.notif-read-all{ color:var(--ui-muted); }

.notif-list{ flex:1; overflow-y:auto; padding:4px 12px 16px; }
.notif-group-label{ padding:12px 8px 6px; font-size:var(--text-sm); color:var(--ui-muted); }
.notif-card{
  position:relative; display:flex; gap:12px; align-items:flex-start; padding:12px 12px 12px 22px; border-radius:12px;
  cursor:pointer; transition:background .12s;
}
.notif-card:hover, .notif-card:focus-visible{ background:var(--md-neutral-background-2-rest); outline:none; }
.notif-card:focus-visible{ outline:2px solid var(--ui-accent); outline-offset:-2px; }
.notif-dot{ position:absolute; left:8px; top:20px; width:7px; height:7px; border-radius:50%; background:var(--ui-accent); opacity:0; }
.notif-card.unread .notif-dot{ opacity:1; }
.notif-avatar{ position:relative; width:36px; height:36px; flex-shrink:0; }
.notif-avatar-img, .notif-avatar-initial{
  display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:10px; overflow:hidden;
  background:var(--ui-accent); color:#FFFFFF; font-size:var(--text-md); font-weight:var(--font-weight-semibold);
}
.notif-avatar-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.notif-type-badge{
  position:absolute; right:-5px; bottom:-5px; width:18px; height:18px; border-radius:50%; background:var(--ui-text);
  color:var(--ui-surface); display:flex; align-items:center; justify-content:center; font-size:9px; border:2px solid var(--ui-surface);
}
.notif-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.notif-title{ font-size:var(--text-md); color:var(--ui-text); line-height:1.35; }
.notif-title b{ font-weight:var(--font-weight-semibold); }
.notif-body{ font-size:var(--text-sm); color:var(--ui-text-2); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.notif-target{ display:flex; align-items:center; gap:6px; font-size:var(--text-sm); color:var(--ui-text-2); min-width:0; }
.notif-target i{ color:var(--ui-muted); flex-shrink:0; }
.notif-target span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.notif-deck-list{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.notif-deck-link{ text-decoration:none; }
.notif-deck-link:hover span{ color:var(--ui-text); text-decoration:underline; }
.notif-side{ flex-shrink:0; display:flex; align-items:flex-start; min-height:24px; }
.notif-date{ font-size:var(--text-xs); color:var(--ui-muted); white-space:nowrap; padding-top:3px; }
.notif-actions{
  display:none; gap:2px; padding:2px; border-radius:8px; background:var(--ui-surface); border:1px solid var(--ui-border);
  box-shadow:var(--shadow-xs); position:absolute; top:8px; right:8px; z-index:1;
}
.notif-actions button{
  width:26px; height:24px; border:none; border-radius:6px; background:none; cursor:pointer; color:var(--ui-text-2);
  display:flex; align-items:center; justify-content:center; font-size:var(--text-sm);
}
.notif-actions button:hover{ background:var(--md-neutral-background-2-rest); color:var(--ui-text); }
.notif-card:hover .notif-date, .notif-card:focus-within .notif-date{ visibility:hidden; }
.notif-card:hover .notif-actions, .notif-card:focus-within .notif-actions{ display:flex; }
.notif-card.pinned .notif-actions [data-act="pin"]{ color:var(--ui-accent); }
.notif-card:not(.unread) .notif-actions [data-act="read"]{ color:var(--ui-accent); }
.notif-empty{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:40px 16px; color:var(--ui-muted); font-size:var(--text-md); text-align:center; }
.notif-empty i{ font-size:28px; }
.notif-empty img{ width:132px; height:auto; display:block; }
.notif-empty-trash{ color:var(--ui-muted); }
.notif-empty-trash:hover{ color:var(--ui-danger); }
.notif-actions [data-act="delete"]:hover{ color:var(--ui-danger); }

.notif-decision{ display:flex; gap:8px; margin-top:6px; visibility:hidden; }
.notif-card:hover .notif-decision, .notif-card:focus-within .notif-decision{ visibility:visible; }
@media (hover: none){ .notif-decision{ visibility:visible; } }

@media (max-width: 767px){
  .notif-panel{ left:0; right:0; top:0; bottom:0; width:auto; max-width:none; border-radius:0; border:none; }
  .app-nav-badge{ top:0; right:0; }
}

.app-nav-item[data-nav="admin"]{ order:6; }
/*! /css/global-search.css */

.gsearch-overlay{
  display:none; position:fixed; inset:0; background:rgba(20,24,32,0.45); z-index:var(--z-modal);
  align-items:flex-start; justify-content:center; padding:12vh 16px 16px;
}
.gsearch-overlay.open{ display:flex; }
.gsearch-overlay.closing .gsearch-modal{ animation:modal-fall-out .45s cubic-bezier(.2,.8,.2,1); }
.gsearch-modal{
  width:620px; max-width:100%; max-height:min(62vh, 100%); background:var(--md-color-grey-white);
  border-radius:16px; box-shadow:var(--shadow-modal); display:flex; flex-direction:column;
  overflow:hidden; animation:modal-rise-in .32s cubic-bezier(.2,.8,.2,1);
}
.gsearch-modal > .tpl-lib-header{ flex-shrink:0; }

.gsearch-bar{
  display:flex; align-items:center; gap:10px; padding:16px 18px;
  border-bottom:1px solid var(--ui-border); flex-shrink:0;
}
.gsearch-bar > i{ color:var(--ui-muted); font-size:var(--text-2xl); flex-shrink:0; }
.gsearch-bar input{
  flex:1; min-width:0; border:0; outline:none; background:none; color:var(--ui-text);
  font-family:var(--font-sans); font-size:var(--text-3xl);
}
.gsearch-bar input::placeholder{ color:var(--ui-muted); }

.gsearch-results{ flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:8px 8px 12px; position:relative; --scroll-fade-inset:12px; }
.gsearch-results.has-scroll:not(.at-scroll-end)::after{
  content:''; position:sticky; display:block; bottom:calc(-1 * var(--scroll-fade-inset, 0px)); left:0; right:0;
  height:48px; margin-top:-48px; pointer-events:none;
  background:linear-gradient(to top, var(--md-color-grey-white) 0%, rgba(255,255,255,0.92) 45%, rgba(255,255,255,0) 100%);
}
html[data-ui-theme="dark"] .gsearch-results.has-scroll:not(.at-scroll-end)::after{
  background:linear-gradient(to top, var(--md-color-grey-white) 0%, rgba(26,31,39,0.92) 45%, rgba(26,31,39,0) 100%);
}
.gsearch-section-label{
  padding:10px 10px 6px; font-size:var(--text-sm); font-weight:var(--font-weight-semibold);
  color:var(--ui-muted); text-transform:uppercase; letter-spacing:.04em;
}
.gsearch-row{
  display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; border:0;
  border-radius:8px; background:none; cursor:pointer; text-align:left;
  font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-text);
}
.gsearch-row:hover, .gsearch-row.active{ background:var(--ui-surface-2); }
.gsearch-row-icon{
  width:28px; height:28px; border-radius:8px; flex-shrink:0; display:flex; align-items:center;
  justify-content:center; background:var(--ui-surface-2); color:var(--ui-muted); font-size:var(--text-lg);
}
.gsearch-row:hover .gsearch-row-icon, .gsearch-row.active .gsearch-row-icon{ color:var(--ui-text); }
.gsearch-row-avatar{
  width:28px; height:28px; border-radius:50%; flex-shrink:0; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  background:var(--ui-accent); color:#fff; font-size:var(--text-md);
  font-family:var(--font-display); font-weight:400;
}
.gsearch-row-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.gsearch-row-meta .tag{ vertical-align:middle; }
.gsearch-row-label{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gsearch-row-meta{ flex-shrink:0; color:var(--ui-muted); font-size:var(--text-sm); }
.gsearch-empty{ padding:24px 16px; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; color:var(--ui-muted); font-size:var(--text-md); }
.gsearch-empty img{ width:120px; height:auto; display:block; }

.gsearch-shortcuts-search{ padding:14px 18px 10px; flex-shrink:0; }
.gsearch-shortcuts-body{ flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 18px 18px; position:relative; --scroll-fade-inset:18px; }
#shortcutsOverlay{ padding-top:8vh; }
#shortcutsOverlay .gsearch-modal{ width:720px; max-height:100%; }
@media (max-height: 700px){
  .gsearch-overlay{ padding:16px; }
  #shortcutsOverlay{ padding-top:16px; }
}
.gsearch-shortcuts-body.has-scroll:not(.at-scroll-end)::after{
  content:''; position:sticky; display:block; bottom:calc(-1 * var(--scroll-fade-inset, 0px)); left:0; right:0;
  height:48px; margin-top:-48px; pointer-events:none;
  background:linear-gradient(to top, var(--md-color-grey-white) 0%, rgba(255,255,255,0.92) 45%, rgba(255,255,255,0) 100%);
}
html[data-ui-theme="dark"] .gsearch-shortcuts-body.has-scroll:not(.at-scroll-end)::after{
  background:linear-gradient(to top, var(--md-color-grey-white) 0%, rgba(26,31,39,0.92) 45%, rgba(26,31,39,0) 100%);
}
.gsearch-shortcut-group{ padding-top:14px; }
.gsearch-shortcut-group-label{
  font-size:var(--text-sm); font-weight:var(--font-weight-semibold); color:var(--ui-muted);
  text-transform:uppercase; letter-spacing:.04em; padding-bottom:4px;
}
.gsearch-shortcut-row{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:9px 0; border-bottom:1px solid var(--ui-border); font-size:var(--text-base); color:var(--ui-text);
}
.gsearch-shortcut-group:last-child .gsearch-shortcut-row:last-child{ border-bottom:none; }
.gsearch-shortcut-keys{ display:flex; align-items:center; gap:4px; flex-shrink:0; color:var(--ui-muted); font-size:var(--text-sm); }
.gsearch-shortcut-keys kbd{
  display:inline-flex; align-items:center; justify-content:center;
  height:24px; min-width:24px; padding:0 7px; box-sizing:border-box; line-height:1;
  font-family:var(--font-sans); font-size:var(--text-sm); color:var(--ui-text);
  background:var(--ui-surface-2); border:1px solid var(--ui-border); border-radius:6px;
}
.gsearch-shortcut-keys kbd.is-arrow{ width:24px; padding:0; font-size:var(--text-base); }

@media (max-width: 767px){
  .gsearch-overlay{ padding:8vh 8px 8px; }
  .gsearch-modal{ max-height:min(84vh, 100%); }
  .gsearch-bar input{ font-size:var(--text-2xl); }
}
/*! /css/trash.css */

.trash-table{ display:flex; flex-direction:column; overflow-x:auto; }
.trash-row{
  display:grid; grid-template-columns:32px 56px 1fr 180px 130px 164px 130px 100px 40px; align-items:center; gap:12px;
  padding:11px 8px; border-bottom:1px solid var(--ui-border); cursor:pointer; min-width:920px;
}
#trashTable .trash-row{ grid-template-columns:32px 56px minmax(140px,1fr) 180px 130px 164px 130px 100px 40px; min-width:1084px; }
.trash-row:hover{ background:var(--md-neutral-background-2-rest); }
.trash-row.selected{ background:var(--md-neutral-background-2-rest); }
.trash-row-header{ cursor:default; }
.trash-row-header:hover{ background:none; }
.trash-row-header .trash-row-date,
.trash-row-header .trash-row-created,
.trash-row-header .trash-row-title,
.trash-row-header .trash-row-slides,
.trash-row-header .trash-row-deletedby,
.trash-row-header .trash-row-team{ font-size:var(--text-md); color:var(--ui-muted); font-weight:var(--font-weight-light); }
.trash-row-header .trash-row-title{ grid-column:2 / 4; }
.trash-row-header .trash-row-thumb-head{ grid-column:2; }
.trash-row-header > *{ grid-row:1; }
.trash-row-header .trash-row-date{ white-space:nowrap; }

.trash-row-select{ display:flex; }
.trash-row-thumb, .trash-row-thumb-head{ width:56px; aspect-ratio:16/9; }
.trash-row-thumb{
  position:relative; overflow:hidden; border-radius:4px; border:1px solid var(--ui-border);
  background:var(--frame-bg);
}
.trash-row-title{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.trash-row-slides{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }
.trash-row-created{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }
.trash-row-date{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); text-align:left; }
.trash-row-deletedby{ display:flex; align-items:center; gap:6px; font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); white-space:nowrap; overflow:hidden; }
.trash-row-deletedby span{ overflow:hidden; text-overflow:ellipsis; }
.trash-deletedby-avatar{ width:20px; height:20px; border-radius:50%; flex-shrink:0; object-fit:cover; }
.trash-deletedby-avatar-initial{
  display:flex; align-items:center; justify-content:center; background:var(--ui-accent); color:var(--md-color-grey-white);
  font-size:var(--text-xs); font-weight:var(--font-weight-semibold); font-family:var(--font-sans);
}
.trash-row-team{ display:flex; }
.trash-team-empty{ font-style:italic; font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }
.trash-table .tag-S{ height:20px; padding:0 8px 0 6px; }
.trash-table .tag-S .tag-label{ font-size:var(--text-md); line-height:14px; }
.trash-table .tag-S .tag-icon i{ font-size:var(--text-md); }
.trash-row-actions{ position:relative; display:flex; justify-content:flex-end; }

.trash-sort-btn{
  border:none; background:none; padding:0; cursor:pointer; font:inherit; color:inherit;
  display:flex; align-items:center; gap:5px;
}
.trash-sort-icon{ font-size:var(--text-sm); color:var(--ui-muted); }
.trash-sort-icon.active{ color:var(--ui-accent); }

.trash-row .deck-select-checkbox, #trashSelectAllCheckbox{ width:20px; height:20px; font-size:var(--text-base); transform:scale(1); pointer-events:auto; }
#trashTable .deck-select-checkbox{ visibility:visible; }
.trash-row .deck-select-checkbox{ display:flex; opacity:0; }
.trash-row:hover .deck-select-checkbox,
.trash-row .deck-select-checkbox.checked,
.trash-table.has-selection .deck-select-checkbox{ opacity:1; }

.trash-row-actions .layout-thumb-menu-btn{
  position:static; opacity:0; width:28px; height:28px; border:none; background:none;
}
.trash-row:hover .trash-row-actions .layout-thumb-menu-btn,
.trash-row-actions .layout-thumb-menu-btn.open{ opacity:1; }
.trash-row-actions .split-menu{ top:calc(100% + 4px); right:0; }

#trashEmptyState.hidden{ display:none; }


.trash-team-filter-btn{ font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-muted); white-space:nowrap; }
.trash-team-filter-value{ font-weight:var(--font-weight-bold); color:var(--md-neutral-foreground-1-rest); }
.trash-team-filter-menu{ top:calc(100% + 6px); left:0; right:auto; min-width:180px; }
.trash-team-filter-option{
  display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:7px 8px;
  border:none; background:none; border-radius:6px; cursor:pointer;
  font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-text);
}
.trash-team-filter-option:hover{ background:var(--md-neutral-background-2-rest); }
.trash-team-filter-option .deck-select-checkbox{ display:flex; pointer-events:none; opacity:1; transform:scale(1); visibility:visible; }

.trash-empty-all-btn{
  display:inline-flex; align-items:center; gap:8px; height:36px; padding:0 14px;
  border-radius:8px; font-weight:var(--font-weight-regular); color:var(--ui-text);
}
.trash-empty-all-btn:hover{ background:var(--md-neutral-background-2-rest); color:var(--ui-text); }

.trash-row-title-btn{
  border:none; background:none; padding:0; margin:0; cursor:pointer; text-align:left; width:100%;
  font-family:inherit; font-size:inherit; font-weight:inherit; color:inherit;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.trash-row-title-btn:hover{ text-decoration:underline; }
.trash-row-title-text{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

#trashPreviewOverlay{
  display:none; position:fixed; inset:0; background:rgba(20,24,32,0.45); z-index:var(--z-modal);
  align-items:center; justify-content:center;
}
#trashPreviewOverlay.open{ display:flex; }
#trashPreviewOverlay.closing #trashPreviewModal{ animation:modal-fall-out .45s cubic-bezier(.2,.8,.2,1); }
#trashPreviewModal{
  width:900px; max-width:92vw; background:var(--md-color-grey-white); border-radius:16px;
  box-shadow:var(--shadow-modal); display:flex; flex-direction:column; overflow:hidden;
  animation:modal-rise-in .32s cubic-bezier(.2,.8,.2,1);
}
.trash-preview-body{ padding:16px 20px; display:flex; flex-direction:column; gap:12px; }
.trash-preview-stage{ position:relative; width:100%; aspect-ratio:16 / 9; border:1px solid var(--ui-border); border-radius:10px; overflow:hidden; background:var(--md-neutral-background-2-rest); }
.trash-preview-nav{ display:flex; align-items:center; justify-content:center; gap:12px; }
.trash-preview-counter{ font-size:var(--text-md); color:var(--ui-muted); }
.trash-preview-empty{ padding:40px 0; text-align:center; color:var(--ui-muted); font-size:var(--text-base); }
.trash-preview-footer{ justify-content:flex-end; gap:8px; }
/*! /css/admin.css */
.admin-section-title{ margin:0; font-size:var(--text-xl); font-weight:var(--font-weight-semibold); color:var(--ui-text); display:flex; align-items:center; gap:8px; }
.admin-count{ font-size:inherit; font-family:var(--font-sans); font-weight:var(--font-weight-regular); color:var(--ui-muted); }
.admin-col-name .admin-count{ color:inherit; }
.admin-user-row{ grid-template-columns:40px 1.4fr 1.5fr 110px 1.1fr 92px 150px 68px; }
.admin-col-edit{ display:flex; align-items:center; justify-content:flex-end; gap:2px; }
.admin-delete-user:hover{ color:var(--ui-danger); }
.admin-table .trash-row{ display:grid; align-items:center; gap:12px; padding:8px 8px; font-size:var(--text-md); }
.admin-col-avatar .presence-avatar{ width:28px; height:28px; font-size:var(--text-md); }
.admin-col-name{ font-size:var(--ui-table-cell-size); font-weight:var(--font-weight-semibold); color:var(--ui-table-cell-color); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-col-email{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-col-decks{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }
.admin-role-dd{ position:relative; width:100%; }
.admin-role-dd-btn{
  width:100%; height:32px; padding:0 10px; display:flex; align-items:center; justify-content:space-between; gap:8px;
  border:1px solid var(--ui-border); border-radius:8px; background:none; color:var(--ui-text); font-family:var(--font-sans); font-size:var(--text-md); cursor:pointer;
}
.admin-role-dd-btn i{ font-size:var(--text-xs); color:var(--ui-muted); }
.admin-role-dd-btn:hover:not(:disabled){ background:var(--md-neutral-background-2-rest); }
.admin-role-dd-btn:disabled{ color:var(--ui-muted); cursor:default; }
.admin-role-dd.is-admin .admin-role-dd-btn{ border-color:var(--ui-accent); color:var(--ui-accent); }
.admin-role-dd-menu{ left:0; right:0; min-width:0; top:calc(100% + 4px); }
.admin-role-dd-modal .admin-role-dd-btn{ height:42px; font-size:var(--text-base); }
.share-email-dropdown button:disabled{ opacity:.5; cursor:not-allowed; }
.admin-dd-team{ margin-left:auto; display:flex; align-items:center; flex-shrink:0; }

.admin-empty{ padding:24px; text-align:center; color:var(--ui-muted); font-size:var(--text-base); }
.admin-empty-illus{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:32px 16px; color:var(--ui-muted); font-size:var(--text-base); }
.admin-empty-illus img{ width:150px; height:auto; display:block; }

.admin-table .trash-row-header > *{
  font-size:var(--text-md); color:var(--ui-muted); font-weight:var(--font-weight-light);
  white-space:nowrap;
}
.admin-user-row{ cursor:pointer; }
.admin-table .trash-row-header.admin-user-row{ cursor:default; }
.admin-col-team{ display:flex; align-items:center; min-width:0; }
.admin-col-job{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-team-empty{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }

.admin-panel-full > .admin-panel-panes > .home-main{ max-width:none; padding-left:56px; padding-right:56px; }
.admin-toolbar-right{ display:flex; align-items:center; gap:10px; flex:1 1 auto; min-width:0; }
.admin-toolbar-right .btn i{ margin-right:6px; }
.admin-col-name{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.admin-col-edit{ display:flex; justify-content:flex-end; }
.admin-edit-user{ color:var(--ui-muted); }
.admin-edit-user:hover{ color:var(--ui-text); }

.admin-modal-overlay{ display:none; position:fixed; inset:0; background:rgba(20,24,32,0.45); z-index:var(--z-modal); align-items:center; justify-content:center; }
.admin-modal-overlay.open{ display:flex; }
.admin-modal-overlay.closing .admin-modal{ animation:modal-fall-out .45s cubic-bezier(.2,.8,.2,1); }
.admin-modal{
  width:560px; max-width:92vw; background:var(--md-color-grey-white); border-radius:16px;
  box-shadow:var(--shadow-modal); display:flex; flex-direction:column; overflow:hidden;
  animation:modal-rise-in .32s cubic-bezier(.2,.8,.2,1);
}
.admin-modal-narrow{ width:460px; }
.admin-modal .admin-modal-body{ overflow:visible; display:flex; gap:24px; align-items:flex-start; }
#adminImageModalModal .admin-modal-body{ flex-direction:column; align-items:stretch; }
.admin-modal .admin-modal-body.has-scroll{ overflow-y:auto; overflow-x:hidden; }
.admin-modal .personal-info-fields{ flex:1; min-width:0; }
.admin-field-pair{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.admin-user-photo-col{ display:flex; flex-direction:column; align-items:center; gap:10px; width:160px; flex-shrink:0; }
.admin-user-photo-col > .btn{ width:100%; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.admin-user-photo-zone{
  width:112px; height:112px; border-radius:14px; overflow:hidden; background:var(--ui-surface-2);
  display:flex; align-items:center; justify-content:center; border:1px solid var(--ui-border);
  align-self:center; flex-shrink:0;
}
.admin-user-photo-preview{ width:100%; height:100%; object-fit:cover; display:block; }
.admin-user-photo-placeholder{ color:var(--ui-muted-light); font-size:36px; }
.admin-user-photo-hint{ margin:0; font-size:var(--text-xs); color:var(--ui-muted); text-align:center; line-height:1.4; }
.admin-modal-hint{ margin:4px 0 0; font-size:var(--text-sm); color:var(--ui-muted); line-height:1.4; }
.admin-modal-error{ margin:6px 0 0; font-size:var(--text-sm); color:var(--ui-danger); }
.admin-modal-error[hidden]{ display:none; }
.admin-modal-note{ margin:0; font-size:var(--text-sm); color:var(--ui-muted); }
.admin-modal-note[hidden]{ display:none; }
.admin-modal-note a{ color:inherit; text-decoration:underline; text-underline-offset:2px; }
.admin-modal-note a:hover{ color:var(--ui-accent); }
.admin-modal .prop-field[hidden]{ display:none; }

.admin-panel{ margin-top:8px; display:flex; align-items:flex-start; gap:24px; }
.admin-panel-full{ margin-top:0; align-items:stretch; gap:0; min-height:100%; }
.admin-panel-full > .admin-side-nav{
  padding:24px 16px; align-self:flex-start; position:sticky; top:0; z-index:2;
  border-right:none; max-height:100vh; overflow-y:auto; overscroll-behavior:contain;
  background:var(--md-color-grey-white);
}
.admin-panel-full > .admin-panel-panes{ display:flex; flex-direction:column; border-left:1px solid var(--ui-border); }
.admin-panel-full > .admin-panel-panes > .home-main{ align-self:stretch; margin-left:0; margin-right:0; }
.admin-panel-panes > .home-main > .home-section{ margin-top:0; }
.admin-side-nav{
  flex:0 0 210px; display:flex; flex-direction:column; gap:2px; align-self:stretch;
  border-right:1px solid var(--ui-border); padding:4px 16px 4px 0;
}
.admin-side-nav-btn{
  display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border:0; border-radius:8px;
  background:none; cursor:pointer; text-align:left; font-family:var(--font-sans);
  font-size:var(--text-base); color:var(--ui-muted);
}
.admin-side-nav-btn[hidden]{ display:none; }
.admin-side-nav-btn:hover{ color:var(--ui-text); background:var(--ui-surface-2); }
.admin-side-nav-btn.active{ color:var(--ui-accent); background:#0040DE0F; font-weight:var(--font-weight-semibold); }
.admin-side-nav-icon{ width:18px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.admin-side-nav-icon .fa-solid{ display:none; }
.admin-side-nav-btn.active .admin-side-nav-icon .fa-regular{ display:none; }
.admin-side-nav-btn.active .admin-side-nav-icon .fa-solid{ display:inline-block; }
.admin-side-nav-divider{ height:1px; background:var(--ui-border); margin:8px 10px; }
.admin-side-nav-group-label{
  padding:4px 10px; font-size:var(--text-sm); font-weight:var(--font-weight-semibold);
  color:var(--ui-muted); text-transform:uppercase; letter-spacing:.04em;
}
.admin-side-nav-divider + .admin-side-nav-group-label{ margin-top:0; }
.admin-side-nav-header{
  padding:2px 10px 14px; font-size:var(--text-3xl);
  font-family:var(--font-display); font-weight:var(--font-weight-light);
  color:var(--ui-text);
}
a.admin-side-nav-btn{ text-decoration:none; }
.admin-panel-panes{ flex:1 1 auto; min-width:0; }
.admin-scroll-sentinel{ display:flex; align-items:center; justify-content:center; gap:10px; padding:18px 0; color:var(--ui-muted); font-size:var(--text-base); }
.admin-table .trash-row:not(.trash-row-header) .admin-col-edit .icon-btn{ opacity:0; transition:opacity .12s ease; }
.admin-table .trash-row:not(.trash-row-header):hover .admin-col-edit .icon-btn,
.admin-table .trash-row:not(.trash-row-header):focus-within .admin-col-edit .icon-btn{ opacity:1; }
.admin-tab-pane.hidden{ display:none; }
.admin-panel-panes .home-section-toolbar{ margin-top:8px; }

.admin-team-row{ grid-template-columns:minmax(130px, 1fr) 110px 68px; cursor:pointer; }
.admin-table .trash-row-header.admin-team-row{ cursor:default; }
.admin-role-row{ grid-template-columns:200px 1.6fr 110px 68px; cursor:pointer; }
.admin-table .trash-row-header.admin-role-row{ cursor:default; }
.admin-col-perms{ display:flex; flex-wrap:wrap; gap:4px; align-items:center; min-width:0; }
.admin-role-perms-more{ display:inline-flex; align-items:center; cursor:default; }
.admin-role-noperm{ font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); }
.admin-role-row .admin-col-name{ display:flex; flex-direction:row; align-items:baseline; gap:8px; min-width:0; }
.admin-role-row .admin-col-name > span{ flex-shrink:0; }
.admin-role-builtin{
  padding:1px 6px; border-radius:999px;
  background:var(--md-neutral-background-2-rest); color:var(--ui-muted);
  font-size:var(--text-md); font-weight:var(--font-weight-regular); text-transform:lowercase;
}
.admin-role-perms{ display:flex; flex-direction:column; gap:2px; }
.admin-role-perm{
  display:flex; align-items:flex-start; gap:10px; padding:8px; border-radius:8px; cursor:pointer;
}
.admin-role-perm:hover{ background:var(--md-neutral-background-2-rest); }
.admin-role-perm.is-readonly{ cursor:default; opacity:.7; }
.admin-role-perm.is-readonly:hover{ background:none; }
.admin-role-perm input{ margin:3px 0 0; accent-color:var(--ui-accent); flex-shrink:0; }
.admin-role-perm-text{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.admin-role-perm-label{ font-size:var(--text-base); color:var(--ui-text); }
.admin-role-perm-desc{ font-size:var(--text-md); color:var(--ui-muted); }
.admin-category-row{ grid-template-columns:minmax(130px, 0.8fr) 1.6fr 88px 68px; cursor:pointer; }
.admin-table .trash-row-header.admin-category-row{ cursor:default; }
.admin-col-usage{
  font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color); text-align:right;
  font-variant-numeric:tabular-nums; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.admin-usage-pills{ margin-bottom:16px; }
.admin-usage-section + .admin-usage-section{ margin-top:32px; }
.admin-usage-title{ margin-bottom:12px; font-size:var(--text-lg); }
.admin-usage-stats{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); gap:12px; margin-bottom:24px; }
.admin-usage-stats:empty{ display:none; }
.admin-usage-stat{
  display:flex; flex-direction:column; gap:4px; min-width:0;
  padding:16px; border:1px solid var(--ui-border); border-radius:12px; background:var(--ui-surface);
}
.admin-usage-stat-label{ flex:1; font-size:var(--text-md); color:var(--ui-muted); }
.admin-usage-stat-value{ font-family:var(--font-sans); font-size:var(--text-6xl); font-weight:var(--font-weight-semibold); line-height:1.1; color:var(--ui-text); }
.admin-usage-stat-total{ margin-left:4px; font-size:var(--text-base); font-weight:var(--font-weight-regular); color:var(--ui-muted); }
.admin-usage-sort{ margin-left:auto; justify-content:flex-end; }
.admin-usage-section{ display:flex; flex-direction:column; }
.admin-usage-toolbar{ position:relative; display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.admin-usage-toolbar:empty{ display:none; }
.admin-period-menu button.active{ color:var(--ui-accent); }
.admin-period-check{ margin-left:auto; padding-left:16px; color:var(--ui-accent); }
.admin-period-range{ font-family:var(--font-sans); font-size:var(--text-base); color:var(--ui-text); }
.admin-period-range i{ color:var(--ui-muted); }

.admin-cal{
  position:absolute; top:calc(100% + 8px); left:0; z-index:var(--z-dropdown);
  background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:16px;
  box-shadow:var(--shadow-popover); padding:16px 20px 14px; font-family:var(--font-sans);
  animation:admin-cal-in .16s ease-out;
}
@keyframes admin-cal-in{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.admin-cal-nav{ position:absolute; top:12px; left:14px; right:14px; display:flex; justify-content:space-between; pointer-events:none; }
.admin-cal-arrow{
  pointer-events:auto; width:32px; height:32px; border:none; border-radius:8px; background:none;
  color:var(--ui-text-2); cursor:pointer; font-size:var(--text-sm);
}
.admin-cal-arrow:hover{ background:var(--ui-surface-2); color:var(--ui-text); }
.admin-cal-arrow:disabled{ opacity:.3; cursor:default; background:none; }
.admin-cal-months{ display:grid; grid-template-columns:repeat(2, 252px); gap:28px; }
.admin-cal-title{ height:32px; line-height:32px; margin-bottom:8px; text-align:center; font-size:var(--text-base); font-weight:var(--font-weight-semibold); color:var(--ui-text); }
.admin-cal-grid{ display:grid; grid-template-columns:repeat(7, 36px); row-gap:2px; }
.admin-cal-weekday{ height:28px; line-height:28px; text-align:center; font-size:var(--text-xs); color:var(--ui-muted); }
.admin-cal-day{
  height:36px; padding:0; border:none; background:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-family:inherit;
}
.admin-cal-day span{
  position:relative; width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:var(--text-md); color:var(--ui-text); transition:background-color .12s ease, color .12s ease;
}
.admin-cal-day:hover:not(:disabled) span{ background:var(--ui-surface-2); }
.admin-cal-day:disabled{ cursor:default; }
.admin-cal-day:disabled span{ color:var(--ui-muted-light); }
.admin-cal-day.is-today span::after{
  content:''; position:absolute; bottom:5px; left:50%; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:var(--ui-accent);
}
.admin-cal-day.in-range{ background:var(--ui-accent-soft); }
.admin-cal-day.in-range span{ color:var(--ui-accent); }
.admin-cal-day.is-start:not(.is-end){ background:linear-gradient(to right, transparent 50%, var(--ui-accent-soft) 50%); }
.admin-cal-day.is-end:not(.is-start){ background:linear-gradient(to left, transparent 50%, var(--ui-accent-soft) 50%); }
.admin-cal-day.is-start span, .admin-cal-day.is-end span,
.admin-cal-day.is-start:hover span, .admin-cal-day.is-end:hover span{ background:var(--ui-accent); color:var(--md-color-grey-white); font-weight:var(--font-weight-semibold); }
.admin-cal-day.is-start.is-today span::after, .admin-cal-day.is-end.is-today span::after{ background:var(--md-color-grey-white); }
.admin-cal-day.is-preview.in-range, .admin-cal-day.is-preview.is-start, .admin-cal-day.is-preview.is-end{ opacity:.75; }
.admin-cal-foot{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin-top:14px; padding-top:14px; border-top:1px solid var(--ui-border);
}
.admin-cal-summary{ font-size:var(--text-md); color:var(--ui-text-2); }
.admin-cal-actions{ display:flex; gap:8px; flex-shrink:0; }
@media (max-width:700px){
  .admin-cal-months{ grid-template-columns:252px; }
  .admin-cal-month:first-child{ display:none; }
  .admin-cal-foot{ flex-direction:column; align-items:stretch; }
}

.admin-skel{
  display:block; height:12px; border-radius:6px;
  background:linear-gradient(90deg, var(--ui-surface-2) 25%, var(--ui-border) 37%, var(--ui-surface-2) 63%);
  background-size:400% 100%; animation:admin-skel-shimmer 1.4s ease infinite;
}
@keyframes admin-skel-shimmer{ 0%{ background-position:100% 0; } 100%{ background-position:0 0; } }
.admin-usage-stat.is-skeleton{ gap:14px; }
.admin-skel-label{ width:60%; }
.admin-skel-value{ width:40%; height:28px; border-radius:8px; }
.admin-skel-table{ min-width:0; }
.admin-skel-row{ display:grid; grid-template-columns:1fr 96px 96px; align-items:center; gap:24px; height:48px; padding:0 12px; border-bottom:1px solid var(--ui-border); }
.admin-skel-row.is-head{ height:40px; }
.admin-skel-row.is-head .admin-skel{ height:10px; }
.admin-skel-num{ width:48px; justify-self:end; }

.admin-usage-pills-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.admin-usage-pills-row .admin-usage-pills{ margin-bottom:0; }
.admin-usage-pills-row .admin-usage-search{ margin-left:auto; }
.admin-usage-note{ margin:12px 0 0; font-size:var(--text-md); color:var(--ui-muted); }
.admin-usage-row{ grid-template-columns:minmax(160px, 1fr) 88px 110px; min-width:0; }
.admin-usage-row.has-category{ grid-template-columns:minmax(140px, 1.6fr) minmax(90px, 1fr) 72px 88px; }
.admin-usage-row.has-category.has-meeting{ grid-template-columns:minmax(140px, 1.4fr) minmax(90px, 1fr) minmax(110px, 1fr) 72px 80px; }
.admin-usage-row.num-3{ grid-template-columns:minmax(160px, 1fr) 88px 88px 110px; }
.admin-usage-row.num-4{ grid-template-columns:minmax(160px, 1fr) 80px 80px 96px 128px; }
.admin-usage-tag{ display:flex; align-items:center; min-width:0; overflow:hidden; }
.admin-usage-tag .tag{ flex-shrink:1; min-width:0; }
.admin-usage-name{
  display:flex; align-items:center; gap:8px; min-width:0;
  font-size:var(--ui-table-cell-size); color:var(--ui-table-cell-color);
}
.admin-usage-name > span:last-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-usage-row.is-family{ cursor:pointer; }
.admin-usage-chevron{
  width:14px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center;
  font-size:var(--text-sm); color:var(--ui-muted); transition:transform .15s ease;
}
.admin-usage-chevron.is-open{ transform:rotate(90deg); }
.admin-usage-row.is-detail .admin-usage-name{ padding-left:22px; }
.admin-usage-variant-mark{ flex-shrink:0; font-size:var(--text-sm); color:var(--ui-muted); }

.admin-pane-head{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:4px 0 4px; }
.admin-pane-title{ margin:0 0 8px; font-size:var(--text-4xl); font-family:var(--font-display); font-weight:var(--font-weight-light); color:var(--ui-text); display:flex; align-items:center; gap:8px; }
.admin-pane-desc{ margin:0; font-size:var(--text-base); color:var(--ui-muted); line-height:1.5; }
.admin-pane-desc a{ color:inherit; text-decoration:underline; text-underline-offset:2px; }
.admin-pane-desc a:hover{ color:var(--ui-accent); }
.admin-pane-cta{ margin-top:10px; margin-bottom:20px; }
.admin-pane-head.no-cta{ padding-bottom:24px; }
.admin-pane-divider{ height:1px; background:var(--ui-border); margin:0 0 24px; }
.admin-keywords{ display:flex; align-items:center; gap:4px; min-width:0; overflow:hidden; }
.admin-keywords .tag{ flex-shrink:0; }

.admin-team-modal-body .personal-info-fields{ display:flex; flex-direction:column; gap:24px; }
.admin-team-colors{ display:flex; flex-wrap:wrap; gap:8px; }
.admin-modal .prop-field > .admin-team-colors{ margin-bottom:10px; }
.admin-team-color{
  width:28px; height:28px; border-radius:50%; border:2px solid transparent; cursor:pointer;
  padding:0; box-shadow:inset 0 0 0 1px rgba(0,0,0,0.08);
}
.admin-team-color.active{ border-color:var(--ui-accent); }
.admin-team-modal-body .share-modal-members{ margin-top:10px; }
.admin-team-member-dropdown{ z-index:var(--z-modal-menu); }
.admin-footer-spacer{ flex:1; }

@media (max-width: 767px){
  .admin-modal .admin-modal-body{ flex-direction:column; align-items:stretch; }
  .admin-user-photo-col{ width:100%; }
  .admin-section-title{ width:100%; font-size:var(--text-lg); }
  .admin-toolbar-right{ width:100%; gap:8px; }
  .admin-toolbar-right .home-decks-search{ order:0; flex:1 1 120px; width:auto; min-width:0; }
  #adminInviteBtn{ flex:0 0 auto; white-space:nowrap; }
  .home-section-toolbar > .home-decks-search{ width:100%; }
  .admin-col-job{ display:none; }
  .admin-user-row{ grid-template-columns:32px minmax(130px, 1.4fr) minmax(150px, 1.5fr) 100px 76px 128px 76px; min-width:700px; }
  .admin-team-row{ grid-template-columns:minmax(110px, 1fr) 80px 56px; min-width:320px; }
  .admin-role-row{ grid-template-columns:140px minmax(160px, 1fr) 80px 56px; min-width:460px; }
  .admin-category-row{ grid-template-columns:minmax(110px, 0.8fr) minmax(140px, 1.6fr) 72px 56px; min-width:440px; }
  .admin-usage-row{ grid-template-columns:minmax(140px, 1fr) 64px 88px; min-width:320px; }
  .admin-usage-row.num-3{ grid-template-columns:minmax(140px, 1fr) 64px 64px 80px; min-width:380px; }
  .admin-usage-row.num-4{ grid-template-columns:minmax(140px, 1fr) 64px 64px 80px 112px; min-width:500px; }
  .admin-usage-stats{ grid-auto-flow:row; grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .admin-usage-stat:first-child:nth-last-child(odd){ grid-column:span 2; }
  .admin-usage-row.has-category{ grid-template-columns:minmax(140px, 1fr) 120px 64px 88px; min-width:440px; }
  .admin-usage-row.has-category.has-meeting{ grid-template-columns:minmax(140px, 1fr) 120px 140px 64px 88px; min-width:580px; }
  .admin-pane-title{ font-size:var(--text-3xl); }
  .admin-panel{ flex-direction:column; gap:12px; }
  .admin-panel-full{ min-height:0; }
  .admin-panel-full > .admin-side-nav{ padding:12px 16px 4px; position:static; max-height:none; align-self:stretch; }
  .admin-panel-full > .admin-panel-panes{ border-left:none; }
  .admin-side-nav-group-label{ display:none; }
  .admin-side-nav-header{ display:none; }
  .admin-side-nav{ flex:0 0 auto; width:100%; flex-direction:row; overflow-x:auto; border-right:0; border-bottom:1px solid var(--ui-border); padding:0 0 4px; }
  .admin-side-nav-btn{ width:auto; white-space:nowrap; }
  .admin-side-nav-divider{ width:1px; height:auto; margin:4px 6px; }
  .admin-panel-panes{ width:100%; }
  .admin-table .trash-row{ gap:8px; padding:8px 4px; }
  .admin-col-avatar .presence-avatar{ width:24px; height:24px; font-size:var(--text-sm); }
  .admin-role-dd-btn{ height:38px; font-size:16px; }
  .admin-modal, .admin-modal-narrow{ width:auto; max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); }
  .admin-modal .tpl-lib-grid-wrap{ overflow:auto; }
  .admin-field-pair{ grid-template-columns:1fr; }
  .admin-user-photo-col{ flex-direction:row; flex-wrap:wrap; justify-content:flex-start; }
  .admin-user-photo-hint{ text-align:left; flex:1 1 100%; }
}

.admin-role-perm-group{
  margin-top:14px; padding-top:12px; border-top:1px solid var(--ui-border);
  font-family:var(--font-display); font-size:var(--text-md); color:var(--ui-muted);
  text-transform:uppercase; letter-spacing:.04em;
}
.admin-role-perms > .admin-role-perm-group:first-child{ margin-top:0; padding-top:0; border-top:none; }

.admin-role-members-row{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:8px; margin:0 0 4px; border:none; border-radius:8px;
  background:none; cursor:pointer; text-align:left; font-family:inherit; color:var(--ui-text);
  transition:background .12s;
}
.admin-role-members-row:hover{ background:var(--ui-surface-2); }
.admin-role-members-avatars{ display:flex; align-items:center; flex-shrink:0; }
.admin-role-members-avatars > *{ margin-left:-8px; box-shadow:0 0 0 2px var(--md-color-grey-white); }
.admin-role-members-avatars > *:first-child{ margin-left:0; }
.admin-role-members-label{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--text-base); }
.admin-role-members-caret{ flex-shrink:0; color:var(--ui-muted); font-size:var(--text-md); }
#adminRoleModalModal .admin-modal-body{ flex-direction:column; align-items:stretch; gap:0; }
.admin-role-members-list{ flex:1 1 auto; min-width:0; width:100%; }
.admin-role-members-list .share-modal-member-row{ padding:8px; }
.admin-role-members-list .share-modal-member-email{ flex:0 1 auto; }
.admin-role-member-team{ margin-left:auto; flex-shrink:0; display:flex; align-items:center; }
.admin-role-members-team{ margin-left:auto; flex-shrink:0; display:flex; align-items:center; }
.admin-role-members-row-static{ cursor:default; }
.admin-role-members-row-static:hover{ background:transparent; }
.admin-modal-back-btn{ margin-right:8px; flex-shrink:0; }
#adminRoleModalModal .tpl-lib-header{ justify-content:flex-start; }
#adminRoleModalModal .tpl-lib-header > span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.admin-warn-icon{ color:var(--yellow-500); font-size:var(--text-base); flex-shrink:0; }
.admin-avatar-wrap{ position:relative; display:inline-flex; }
.admin-warn-on-avatar{
  position:absolute; top:-3px; right:-4px; font-size:var(--text-xs); line-height:1;
  background:var(--ui-surface); border-radius:50%; padding:1px;
}
.admin-side-nav-warn{ margin-left:auto; font-size:var(--text-sm); }

.admin-brand-list{ display:flex; flex-direction:column; }
.admin-brand-item{ display:grid; grid-template-columns:auto minmax(0, 1fr) auto; align-items:center; gap:24px; padding:16px 0; border-bottom:1px solid var(--ui-border); }
.admin-brand-item:first-child{ padding-top:0; }
.admin-brand-previews{ display:flex; gap:8px; }
.admin-brand-preview{ --brand-preview-bg:#FFFFFF; width:160px; height:96px; padding:12px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; border:1px solid var(--ui-border); border-radius:8px; background:var(--brand-preview-bg); }
.admin-brand-preview.is-dark{ --brand-preview-bg:#151A22; }
.admin-brand-preview.is-tall{ width:72px; height:120px; padding:0; overflow:hidden; }
.admin-brand-preview img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }
.admin-brand-preview.is-dark img{ filter:brightness(0) invert(1); }
.admin-brand-name{ margin:0 0 4px; font-size:var(--text-base); font-weight:600; color:var(--ui-text); }
.admin-brand-where{ margin:0 0 6px; font-size:var(--text-md); color:var(--ui-muted); line-height:1.45; }
.admin-brand-state{ margin:0; font-size:var(--text-md); color:var(--ui-muted); }
.admin-brand-state.is-custom{ color:var(--ui-text); }
.admin-brand-actions{ display:flex; gap:8px; }
.admin-brand-empty{ margin:0; color:var(--ui-muted); font-size:var(--text-md); }
@media (max-width:767px){
  .admin-brand-item{ grid-template-columns:minmax(0, 1fr); gap:12px; }
  .admin-brand-preview{ width:128px; height:80px; }
}
/*! /css/generate-loading.css */
#generateLoadingOverlay{
  display:none; position:fixed; inset:0; background:var(--md-color-grey-white); z-index:var(--z-loading);
  flex-direction:column; align-items:center; justify-content:center; gap:40px;
}
#generateLoadingOverlay.open{ display:flex; }

.generate-loading-logo{ width:52px; height:52px; animation:generate-logo-spin .6s ease-out, generate-logo-pulse 1.1s ease-in-out .6s infinite; }
@keyframes generate-logo-spin{
  0%{ opacity:0; transform:rotate(-50deg) scale(0.7); }
  100%{ opacity:1; transform:rotate(0deg) scale(1); }
}
@keyframes generate-logo-pulse{
  0%, 100%{ opacity:1; transform:scale(1); }
  50%{ opacity:0.55; transform:scale(1.08); }
}

.generate-loading-viewport{ height:106px; overflow:hidden; width:280px; -webkit-mask-image:linear-gradient(to bottom, transparent, var(--md-color-grey-black) 25%, var(--md-color-grey-black) 75%, transparent); mask-image:linear-gradient(to bottom, transparent, var(--md-color-grey-black) 25%, var(--md-color-grey-black) 75%, transparent); }
.generate-loading-track{ display:flex; flex-direction:column; gap:8px; transition:transform .35s cubic-bezier(.4,0,.2,1); }
.generate-loading-track.no-transition{ transition:none; }
.generate-loading-row{
  height:30px; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-sans); font-size:var(--text-xl); color:var(--ui-text); text-align:center;
  opacity:0.3; filter:blur(2px); transition:opacity .18s ease, filter .18s ease, font-size .18s ease;
}
.generate-loading-row.active{
  opacity:1; filter:blur(0); font-weight:var(--font-weight-semibold); font-size:var(--text-4xl);
  background:linear-gradient(90deg, var(--ui-muted-light) 0%, var(--ui-text-2) 50%, var(--ui-muted-light) 100%);
  background-size:200% 100%; -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:generate-loading-pulse 1.6s ease-in-out infinite;
}
@keyframes generate-loading-pulse{
  0%, 100%{ opacity:1; }
  50%{ opacity:0.5; }
}

.generate-loading-simple-text{
  display:none; font-family:var(--font-sans); font-size:var(--text-xl); font-weight:var(--font-weight-semibold);
  background:linear-gradient(90deg, var(--ui-muted-light) 0%, var(--ui-text-2) 50%, var(--ui-muted-light) 100%);
  background-size:200% 100%; -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:generate-loading-pulse 1.6s ease-in-out infinite;
}
#generateLoadingOverlay.simple .generate-loading-viewport{ display:none; }
#generateLoadingOverlay.simple .generate-loading-simple-text{ display:block; }
/*! /css/home-discovery.css */

.home-discovery-overlay{
  position:fixed; inset:0; z-index:var(--z-dropdown); background:var(--md-color-grey-white);
  display:flex; flex-direction:column;
}
.home-discovery-overlay.hidden{ display:none; }
.home-discovery-overlay.is-entering{ transition:clip-path .64s cubic-bezier(.22,1,.36,1); }
@keyframes discovery-content-in{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }
.home-discovery-overlay:not(.hidden) .home-discovery-back{
  animation:discovery-content-in .5s cubic-bezier(.22,1,.36,1) .26s both;
}
.home-discovery-overlay:not(.hidden) .home-discovery-body{
  animation:discovery-content-in .56s cubic-bezier(.22,1,.36,1) .34s both;
}
.home-discovery-overlay.is-leaving{ opacity:0; pointer-events:none; transition:opacity .22s ease; }
@media (prefers-reduced-motion: reduce){
  .home-discovery-overlay.is-entering{ transition:none; }
  .home-discovery-overlay:not(.hidden) .home-discovery-back,
  .home-discovery-overlay:not(.hidden) .home-discovery-body{ animation:none; }
}

.home-discovery-back{
  display:flex; align-items:center; gap:8px; align-self:flex-start;
  margin:20px 0 0 24px; padding:8px 14px; border:none; background:none;
  color:var(--ui-muted); font-size:var(--text-lg); cursor:pointer; border-radius:8px;
}
.home-discovery-back:hover{ background:var(--ui-surface-2); color:var(--ui-text); }

.home-discovery-body{
  flex:1; min-height:0; display:flex; justify-content:center; gap:24px;
  padding:24px 24px 40px; overflow:hidden;
}

.home-discovery-chat{
  flex:0 1 720px; min-width:360px; max-width:720px;
  display:flex; flex-direction:column; min-height:0;
  transition:flex-basis .25s ease, max-width .25s ease;
}
.home-discovery-body.has-outline .home-discovery-chat{
  flex:0 1 420px; max-width:420px;
}
.home-discovery-chat .slide-gen-chat{
  flex:1; min-height:0; overflow-y:auto; padding-right:4px;
}
.home-discovery-chat .home-generate-wrap{ margin-top:16px; }

.home-discovery-outline{
  flex:1 1 480px; max-width:640px; min-height:0;
  display:flex; flex-direction:column; border-left:1px solid var(--ui-border);
  padding-left:24px;
}
.home-discovery-outline.hidden{ display:none; }

@keyframes home-discovery-outline-card-in{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}
.home-discovery-outline-card-enter{
  animation:home-discovery-outline-card-in .35s ease both;
  animation-delay:var(--card-delay, 0ms);
}

.home-discovery-outline-header{
  display:flex; align-items:center; justify-content:space-between;
  font-weight:var(--font-weight-semibold); font-size:var(--text-xl); margin-bottom:12px;
}
.home-discovery-outline-actions{ display:flex; gap:4px; }

.home-discovery-outline-list-wrap{ position:relative; flex:1; min-height:0; display:flex; flex-direction:column; }
.home-discovery-outline-list-wrap::after{
  content:''; position:absolute; left:0; right:0; bottom:0; height:64px; pointer-events:none;
  background:linear-gradient(to bottom, transparent, var(--md-color-grey-white));
  opacity:0; transition:opacity .2s ease;
}
.home-discovery-outline-list-wrap.has-more-below::after{ opacity:1; }
.home-discovery-outline-list{ scrollbar-width:none; }
.home-discovery-outline-list::-webkit-scrollbar{ display:none; }
.home-discovery-outline-list{
  flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column;
  padding:0 2px; margin:0 -2px;
}

.home-discovery-outline-card{
  border:1px solid var(--ui-border); border-radius:10px; padding:12px 14px;
  background:var(--ui-surface);
}
.home-discovery-outline-card.dragging{ opacity:0.4; }
.discovery-outline-merging{ position:relative; }
.discovery-outline-merging::after{
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:var(--md-neutral-background-2-rest); animation:slide-gen-pulse 1.1s ease-in-out infinite;
}
.discovery-merge-review-bar{
  position:fixed; z-index:var(--z-toolbar); display:flex; align-items:center; gap:2px;
  background:var(--md-color-grey-white); border-radius:10px; padding:4px; box-shadow:var(--shadow-popover);
}
.discovery-merge-block-overlay{
  position:fixed; inset:0; z-index:var(--z-toolbar-backdrop); background:transparent;
}
.discovery-merge-review-ignore{ color:var(--ui-muted); }
.discovery-merge-review-ignore:hover{ background:var(--ui-surface-2); }
.discovery-merge-review-accept{ color:var(--ui-accent); font-weight:var(--font-weight-semibold); }
.discovery-merge-review-accept:hover{ background:var(--ui-surface-2); }
.home-discovery-outline-add-btn{ width:22px; height:22px; padding:0; border-radius:50%; justify-content:center; }
.home-discovery-outline-add-wrap{ position:relative; display:flex; flex-shrink:0; }
.home-discovery-outline-gap-menu{ left:50%; right:auto; transform:translateX(-50%); min-width:190px; }
.home-discovery-outline-card:focus{ outline:none; border-color:var(--ui-accent); }
.home-discovery-outline-card:focus-within{ border-color:var(--ui-accent); box-shadow:0 0 0 1px var(--ui-accent); }
.home-discovery-outline-card-row{ display:flex; align-items:flex-start; gap:10px; }
.home-discovery-outline-card-num{
  position:relative; width:20px; height:20px; flex-shrink:0; margin-top:2px;
  display:flex; align-items:center; justify-content:center; cursor:grab;
}
.home-discovery-outline-card-num-text{ font-size:var(--text-sm); font-weight:var(--font-weight-semibold); color:var(--ui-muted); transition:opacity .12s ease; }
.home-discovery-outline-card-num-grip{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:var(--text-md); color:var(--ui-muted); opacity:0; transition:opacity .12s ease;
}
.home-discovery-outline-card:hover .home-discovery-outline-card-num-text{ opacity:0; }
.home-discovery-outline-card:hover .home-discovery-outline-card-num-grip{ opacity:1; }
.home-discovery-outline-card-fields{ flex:1; min-width:0; }
.home-discovery-outline-card-title{
  font-weight:var(--font-weight-semibold); font-size:var(--text-lg); margin-bottom:4px; outline:none;
}
.home-discovery-outline-card-summary{
  font-size:var(--text-base); color:var(--ui-muted); outline:none;
}
.home-discovery-outline-card-title[data-placeholder]:empty:before,
.home-discovery-outline-card-summary[data-placeholder]:empty:before{
  content:attr(data-placeholder); color:var(--ui-muted);
}
.home-discovery-outline-gap{
  display:flex; align-items:center; justify-content:center; gap:8px;
  height:18px; opacity:0; transition:opacity .15s ease;
  position:relative; z-index:2;
}
.home-discovery-outline-gap:hover, .home-discovery-outline-gap:focus-within{ opacity:1; }
.home-discovery-outline-gap-line{ width:100px; flex:0 0 auto; height:1px; background:var(--ui-accent); }
.home-discovery-outline-gap-btn{
  border:1px solid var(--ui-accent); background:var(--ui-accent); color:var(--md-color-grey-white);
  font-size:var(--text-sm); cursor:pointer; padding:3px 10px; border-radius:6px; display:flex; align-items:center; gap:4px;
  box-shadow:0 2px 6px rgba(var(--shadow-rgb),0.10); flex-shrink:0;
}
.home-discovery-outline-gap-btn:hover{ opacity:0.85; }
.home-discovery-outline-gap-btn:disabled{ background:var(--ui-border); border-color:var(--ui-border); color:var(--ui-muted); cursor:not-allowed; }
.home-discovery-outline-gap-btn:disabled:hover{ opacity:1; }
.drag-ghost-preview{ pointer-events:none; z-index:var(--z-float); opacity:0.9; box-shadow:var(--shadow-raised); }
#homeDiscoveryOutlineList.reordering .home-discovery-outline-gap{ pointer-events:none; opacity:0; }
#homeDiscoveryOutlineList.has-multi-selection .home-discovery-outline-gap{ pointer-events:none; opacity:0; }
#homeDiscoveryOutlineList.has-multi-selection .home-discovery-outline-card.is-selected [contenteditable="true"]{
  pointer-events:none; user-select:none;
}
.home-discovery-outline-card.is-selected{ cursor:grab; }
.home-discovery-outline-card.is-selected .home-discovery-outline-card-num-text{ opacity:0; }
.home-discovery-outline-card.is-selected .home-discovery-outline-card-num-grip{ opacity:1; }
#homeDiscoveryOutlineList .drag-reorder-indicator{ height:4px; margin:4px 0; }

.home-discovery-generate-btn{ margin-top:16px; align-self:stretch; }

.home-discovery-outline-card-badge{
  display:inline-flex; align-items:center; gap:5px; margin-bottom:4px;
  font-size:var(--text-xs); font-weight:var(--font-weight-semibold); letter-spacing:0.04em; text-transform:uppercase;
  color:var(--ui-muted);
}
.home-discovery-outline-card-badge i{ font-size:var(--text-2xs); }
.home-discovery-outline-card-num-icon{ font-size:var(--text-sm); color:var(--ui-muted); }
.home-discovery-outline-card-title.is-static{
  color:var(--ui-muted); font-weight:var(--font-weight-regular); cursor:default;
}

.home-discovery-outline-card.type-cover,
.home-discovery-outline-card.type-conclusion{
  background:color-mix(in srgb, var(--ui-accent) 6%, var(--md-color-grey-white));
  border-color:color-mix(in srgb, var(--ui-accent) 22%, var(--md-color-grey-white));
}
.home-discovery-outline-card.type-cover .home-discovery-outline-card-badge,
.home-discovery-outline-card.type-conclusion .home-discovery-outline-card-badge{ color:var(--ui-accent); }
.home-discovery-outline-card.type-cover .home-discovery-outline-card-num-icon,
.home-discovery-outline-card.type-conclusion .home-discovery-outline-card-num-icon{ color:var(--ui-accent); }

.home-discovery-outline-card.type-section{
  background:color-mix(in srgb, var(--md-color-teal-500) 12%, var(--md-color-grey-white));
  border-color:color-mix(in srgb, var(--md-color-teal-500) 35%, var(--md-color-grey-white));
}
.home-discovery-outline-card.type-section .home-discovery-outline-card-badge,
.home-discovery-outline-card.type-section .home-discovery-outline-card-num-icon{ color:var(--md-color-teal-700); }
.home-discovery-outline-card.type-section .home-discovery-outline-card-title{ font-weight:var(--font-weight-semibold); }

.home-discovery-outline-card.type-agenda{ background:var(--ui-surface-2); }
html[data-ui-theme="dark"] .home-discovery-outline-card.type-cover,
html[data-ui-theme="dark"] .home-discovery-outline-card.type-conclusion{
  background:rgba(107,138,247,0.14); border-color:rgba(107,138,247,0.42);
}
html[data-ui-theme="dark"] .home-discovery-outline-card.type-section{
  background:rgba(0,215,175,0.12); border-color:rgba(0,215,175,0.4);
}
html[data-ui-theme="dark"] .home-discovery-outline-card.type-section .home-discovery-outline-card-badge,
html[data-ui-theme="dark"] .home-discovery-outline-card.type-section .home-discovery-outline-card-num-icon{ color:var(--md-color-teal-400); }
html[data-ui-theme="dark"] .home-discovery-outline-card.type-agenda{ background:var(--ui-surface-2); border-color:var(--ui-border); }


.home-discovery-outline-card.is-fixed .home-discovery-outline-card-num{ cursor:default; }
.home-discovery-outline-card.is-fixed .home-discovery-outline-card-num-grip{ display:none; }

.home-discovery-outline-card-num-icon{ transition:opacity .12s ease; }
.home-discovery-outline-card:hover .home-discovery-outline-card-num-icon{ opacity:0; }
.home-discovery-outline-card.is-fixed:hover .home-discovery-outline-card-num-icon{ opacity:1; }

.home-discovery-outline-card{ user-select:none; -webkit-user-select:none; }
.home-discovery-outline-card [contenteditable="true"]{ user-select:text; -webkit-user-select:text; }
#homeDiscoveryOutlineList.reordering,
#homeDiscoveryOutlineList.reordering [contenteditable="true"]{ user-select:none; -webkit-user-select:none; }

#homeDiscoveryOutlineList .drag-reorder-indicator{
  flex:0 0 auto;
  position:relative; height:3px; margin:5px 0; border-radius:2px;
  background:var(--ui-accent); box-shadow:0 0 0 3px rgba(0,64,222,0.12);
}
#homeDiscoveryOutlineList .drag-reorder-indicator::before{
  content:''; position:absolute; left:-4px; top:50%; transform:translateY(-50%);
  width:9px; height:9px; border-radius:50%;
  background:var(--md-color-grey-white); border:2.5px solid var(--ui-accent);
}
#homeDiscoveryOutlineList.reordering .home-discovery-outline-gap-btn{ opacity:0; pointer-events:none; }

.home-discovery-notes-toggle{
  display:flex; align-items:center; gap:8px; padding:10px 2px 12px;
  font-size:var(--text-md); color:var(--ui-text); cursor:pointer; user-select:none;
}
.home-discovery-notes-toggle input{ width:15px; height:15px; accent-color:var(--ui-accent); cursor:pointer; margin:0; }

.home-discovery-outline-card.is-selected{
  border-color:var(--ui-accent); box-shadow:0 0 0 1px var(--ui-accent);
}

.home-discovery-overlay.is-claude-plan .home-discovery-chat,
.home-discovery-overlay.is-claude-plan .home-discovery-notes-toggle{ display:none; }
.home-discovery-overlay.is-claude-plan .home-discovery-outline{
  flex:1 1 auto; max-width:720px; border-left:none; padding-left:0;
}
.home-discovery-claude-hint{
  margin:-4px 0 14px; font-size:var(--text-md); color:var(--ui-text-2); line-height:1.45;
}
/*! /css/mobile.css */

@media (max-width:767px){
  .topbar{ min-height:56px; padding:8px 10px; gap:6px; }
  .topbar-actions{ gap:4px; }
  .topbar-brand{ gap:6px; min-width:0; }
  .topbar-brand-logo{ height:18px; }
  .topbar > .presence-stack{ display:none; }
  .split-menu{ max-width:calc(100vw - 16px); }

  body.home-body .app-row{ flex-direction:column; }
  body.home-body .app-nav{
    order:2; width:100%; height:auto; flex-direction:row; justify-content:space-around; align-items:center;
    gap:0; padding:4px 0 calc(4px + env(safe-area-inset-bottom)); border-top:1px solid var(--ui-border);
    z-index:30;
  }
  body.home-body .app-nav-item{ flex:1 1 0; width:auto; padding:2px 0 4px; gap:2px; }
  body.home-body .app-nav-icon{ width:32px; height:32px; }
  body.home-body .app-nav-avatar-wrap{ flex:0 0 auto; position:relative; margin:0 8px; }
  body.home-body .app-nav-avatar-wrap .split-menu.rail-avatar-menu{ top:auto; bottom:calc(100% + 8px); left:auto; right:0; }
  body.home-body .app-page-body{ border-radius:0; flex:1 1 auto; min-height:0; box-shadow:none; }

  .home-main{ padding:36px 14px 32px; }
  .home-hero{ min-height:auto; flex-direction:column; align-items:stretch; }
  .home-hero-panel{ max-width:none; padding:20px 14px 12px; }
  .home-greeting-text{ font-size:28px; }
  .home-greeting-img{ width:40px; height:40px; }
  .home-generate-textarea{ min-height:104px; }
  .home-generate-textarea:focus{ min-height:140px; }
  .home-hero-ctas-wrap{ padding:0 14px; }
  .home-hero-ctas{ width:fit-content; box-sizing:border-box; flex-direction:row; padding:6px; border-radius:14px; }
  .home-hero-ctas .btn{ flex:0 0 auto; justify-content:center; }
  .home-cta-primary, .home-cta-secondary{ padding:9px 14px; font-size:var(--text-base); border-radius:10px; }
  .home-cta-word{ display:none; }
  .home-section{ margin-top:28px; }
  .home-section-header{ flex-wrap:wrap; gap:8px; }
  .home-section-toolbar{ height:auto; flex-wrap:wrap; gap:8px; }
  .home-decks-search{ flex:1 1 90px; width:auto; min-width:0; max-width:none; margin-left:0; order:0; }
  .deck-filter-pills{ width:100%; }
  .trash-team-filter{ margin-left:auto; }
  .trash-search{ flex:1 1 60px; }
  .trash-empty-all-btn span{ display:none; }
  .trash-empty-all-btn{ padding:0 10px; }
  body.home-body .app-nav-divider{ display:none; }
  .trash-row, #trashTable .trash-row{ grid-template-columns:32px 56px minmax(170px, 1fr) 90px 130px 164px 130px 100px 40px; min-width:1024px; }
  .home-generate-submit{ right:10px; bottom:10px; width:36px; height:36px; }
  .home-generate-textarea{ padding-right:54px; padding-bottom:52px; }
  .home-scroll-row .layout-thumb{ flex:0 0 200px; }
  .home-templates-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .decks-banner{ height:110px; }

  .home-discovery-back{ margin:8px 0 0 8px; }
  .home-discovery-body{ flex-direction:column; gap:12px; padding:8px 12px calc(12px + env(safe-area-inset-bottom)); }
  .home-discovery-chat,
  .home-discovery-body.has-outline .home-discovery-chat{ flex:1 1 auto; min-width:0; max-width:none; }
  .home-discovery-body.has-outline .home-discovery-chat{ flex:0 0 42%; }
  .home-discovery-outline{ flex:1 1 auto; max-width:none; border-left:none; padding-left:0; border-top:1px solid var(--ui-border); padding-top:12px; }

  .trash-table{ margin:0 -14px; padding:0 14px; }
  .trash-table, .deck-filter-pills{ scrollbar-width:none; }
  .trash-table::-webkit-scrollbar, .deck-filter-pills::-webkit-scrollbar{ display:none; }
  .hs-more-right{
    -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 48px), transparent);
    mask-image:linear-gradient(to right, #000 calc(100% - 48px), transparent);
  }
  .hs-more-left{
    -webkit-mask-image:linear-gradient(to right, transparent, #000 48px);
    mask-image:linear-gradient(to right, transparent, #000 48px);
  }
  .hs-more-left.hs-more-right{
    -webkit-mask-image:linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    mask-image:linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  }
  .trash-table.hs-more-right{
    -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 14px - 48px), transparent calc(100% - 14px));
    mask-image:linear-gradient(to right, #000 calc(100% - 14px - 48px), transparent calc(100% - 14px));
  }
  .trash-table.hs-more-left{
    -webkit-mask-image:linear-gradient(to right, transparent 14px, #000 calc(14px + 48px));
    mask-image:linear-gradient(to right, transparent 14px, #000 calc(14px + 48px));
  }
  .trash-table.hs-more-left.hs-more-right{
    -webkit-mask-image:linear-gradient(to right, transparent 14px, #000 calc(14px + 48px), #000 calc(100% - 14px - 48px), transparent calc(100% - 14px));
    mask-image:linear-gradient(to right, transparent 14px, #000 calc(14px + 48px), #000 calc(100% - 14px - 48px), transparent calc(100% - 14px));
  }
  .mobile-only{ display:revert !important; }
  .split-menu button.mobile-only{ display:flex !important; }

  .login-col-left{ padding:32px 20px; }
  .login-title{ font-size:var(--text-4xl); }

  body.editor-body .app-nav{ display:none; }
  body.editor-body .topbar .sidebar-collapse-btn,
  body.editor-body #rightRailCollapseBtn,
  body.editor-body .topbar-sep,
  body.editor-body #autosavePill,
  body.editor-body #viewMenuWrap,
  body.editor-body #deckLangWrap{ display:none; }
  body.editor-body #commentsToggleBtn,
  body.editor-body #presentSplit .split-main{ font-size:0; padding:0 10px; height:34px; gap:0; }
  body.editor-body #commentsToggleBtn i,
  body.editor-body #presentSplit .split-main i{ font-size:15px; }
  body.editor-body #presentSplit .split-caret{ height:34px; }
  body.editor-body #shareDeckBtn{ font-size:0; padding:0 10px; height:34px; gap:0; }
  body.editor-body #shareDeckBtn i{ font-size:15px; }
  body.editor-body #templateEditSaveBtn{ padding:0 10px; height:34px; font-size:var(--text-md); }

  body.editor-body .main{ flex-direction:column; }
  body.editor-body .stage-wrapper{
    order:1; flex:1 1 auto; min-height:0; width:100%;
    border-radius:0; border-left:none; border-right:none; box-shadow:none;
  }
  body.editor-body .stage{ padding:12px; }
  body.editor-body #framesContainer::after{ right:-12px; bottom:-12px; }
  body.editor-body .presenter-notes-box{ left:8px; right:8px; bottom:8px; padding:6px 10px; }
  body.editor-body .stage-mode-bar{ bottom:8px; }
  body.editor-body .stage-wrapper:has(.stage-mode-bar) .presenter-notes-box{ bottom:62px; }

  body.editor-body .sidebar-left{
    order:2; width:100%; flex:0 0 auto; flex-direction:row; align-items:stretch;
    margin:0; border-radius:0; box-shadow:none; border-top:1px solid var(--ui-border);
    background:var(--md-color-grey-white); transition:none;
  }
  body.editor-body .sidebar-header{ padding:8px 6px 8px 8px; align-items:center; border-right:1px solid var(--ui-border); }
  body.editor-body .sidebar-header .split-main{ padding:0 10px; height:34px; }
  body.editor-body .sidebar-header .split-caret{ height:34px; }
  body.editor-body #createSlideMenu{ left:0; right:auto; top:auto; bottom:calc(100% + 6px); }
  body.editor-body .slide-list{
    flex:1 1 auto; min-width:0; flex-direction:row; align-items:center; gap:8px;
    padding:8px 10px; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch; scrollbar-width:none;
  }
  body.editor-body .slide-list::-webkit-scrollbar{ display:none; }
  body.editor-body .slide-item,
  body.editor-body .slide-item-skeleton{ flex:0 0 auto; width:132px; padding:4px; scroll-snap-align:center; }
  body.editor-body .slide-item .slide-number{ width:16px; }
  body.editor-body .slide-gap-hit{ display:none; }
  body.editor-body .slide-item.active .slide-more-btn{ opacity:1; pointer-events:auto; }

  body.editor-body .rail-dock{ order:3; width:100%; height:auto; flex:0 0 auto; flex-direction:column; align-items:stretch; }
  body.editor-body .icon-rail-dock{ height:auto; width:100%; }
  body.editor-body .icon-rail{
    width:100%; flex-direction:row; justify-content:space-around; align-items:stretch; gap:0;
    padding:2px 4px calc(4px + env(safe-area-inset-bottom)); border-top:1px solid var(--ui-border); box-sizing:border-box;
  }
  body.editor-body .icon-rail-btn{ flex:1 1 0; min-width:0; padding:6px 0 4px; gap:3px; border-radius:10px; }
  body.editor-body .icon-rail-btn i{ font-size:var(--text-2xl); }
  body.editor-body .rail-panel.open{
    position:fixed; left:0; right:0; bottom:0; top:auto; width:auto !important; height:min(72vh, 600px);
    margin:0; border-radius:16px 16px 0 0; z-index:950;
    box-shadow:0 -8px 28px rgba(var(--shadow-rgb),0.18); border-top:1px solid var(--ui-border);
    padding-bottom:env(safe-area-inset-bottom);
    animation:mobile-sheet-in .28s cubic-bezier(.22,1,.36,1) both;
  }
  body.editor-body .rail-panel-resize-handle{ display:none; }
  body.editor-body .rail-panel-header{ padding-top:14px; }
  body.editor-body .rail-panel.open::before{
    content:''; position:absolute; top:6px; left:50%; width:36px; height:4px; margin-left:-18px;
    border-radius:2px; background:var(--ui-border-strong); z-index:2;
  }

  body.editor-body #commentPopover{
    left:8px !important; right:8px !important; top:auto !important;
    bottom:calc(8px + env(safe-area-inset-bottom)) !important; width:auto; max-height:70vh; overflow:auto;
    border-radius:14px; box-sizing:border-box;
  }
  #selectionToolbar, #aiRewritePopover, #aiRewriteReviewToolbar, .link-popover{ max-width:calc(100vw - 16px); }
  #aiRewritePopover, .link-popover{ width:auto; min-width:min(300px, calc(100vw - 16px)); }

  #templateLibraryModal, #imageLibraryModal, #fileImportModal, #dataTableModal, #imageCardEditModal,
  #nameModalModal, #importDeckModal, #thumbnailModalModal, #shareModalModal, #avatarModalModal,
  #personalInfoModalModal{
    width:auto; max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); box-sizing:border-box;
  }
  #templateLibraryModal, #imageLibraryModal{ height:calc(100vh - 16px); }
  #confirmDialogModal{ max-width:calc(100vw - 24px); }
}

@keyframes mobile-sheet-in{ from{ transform:translateY(24px); opacity:0; } to{ transform:none; opacity:1; } }

@media (max-width:420px){
  .home-templates-grid{ grid-template-columns:minmax(0, 1fr); }
  .home-greeting-text{ font-size:24px; }
  body.editor-body .slide-item, body.editor-body .slide-item-skeleton{ width:116px; }
}

@media (max-width:767px) and (max-height:480px){
  body.editor-body .slide-item, body.editor-body .slide-item-skeleton{ width:96px; }
  body.editor-body .slide-list{ padding:4px 8px; }
  body.editor-body .icon-rail-btn{ flex-direction:row; gap:6px; padding:4px 0; }
  body.editor-body .rail-panel.open{ height:calc(100vh - 56px); }
}

@media (max-width:767px){
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .btn{
    min-height:44px; padding:10px 16px; font-size:var(--text-xl); border-radius:12px;
  }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .btn.btn-sm{
    min-height:36px; padding:7px 12px; font-size:var(--text-lg);
  }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .btn-ghost{
    min-height:44px; padding:0 14px; font-size:var(--text-xl);
  }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .icon-btn{
    width:40px; height:40px; border-radius:12px; font-size:var(--text-xl);
  }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .icon-btn-ghost{
    width:44px; height:44px;
  }
  .split-menu button, .view-menu-option, .deck-lang-option{ min-height:44px; }
  :is(.rail-panel, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"]) :is(input[type="text"], input[type="email"], input[type="search"], input[type="number"], textarea, select){
    min-height:44px; font-size:16px;
  }
  .prop-field input, .prop-field textarea{ font-size:16px; }
  .prop-span-field, .prop-grid-field{ height:44px; }
  .prop-span-field button, .prop-grid-field button{ width:36px; height:36px; }
  .cols-group button, .mini-segment button{ min-height:36px; }
  .deck-filter-pills button{ min-height:40px; padding:0 16px; }
  .home-input-mode-btn{ min-height:40px; padding:0 18px; }
  .home-generate-submit{ width:44px; height:44px; }
  .search-box input{ min-height:44px; font-size:16px; }
  .home-generate-placeholder{ font-size:16px; }
  .slide-more-btn{ width:36px; height:36px; }
  body.editor-body .stage-mode-btn{ width:48px; height:48px; }
  body.editor-body .icon-rail-btn{ min-height:56px; }
  body.home-body .app-nav-item{ min-height:56px; }
  .switch{ transform:scale(1.15); transform-origin:right center; }
  .comment-entry .entry-actions button, .comment-resolve-btn{ min-width:40px; min-height:40px; }
}

@media (max-width:767px){
  body.home-body .app-nav-icon{ width:40px; height:40px; border-radius:12px; }
  body.home-body .app-nav-icon i{ font-size:20px; }
  body.home-body .app-nav-item{ font-size:11px; gap:3px; }
  body.home-body .app-nav-avatar{ width:40px; height:40px; font-size:var(--text-xl); }
  .rail-panel-header-actions .icon-btn-ghost{ font-size:26px; line-height:1; }
  .rail-panel-header-actions .icon-btn-ghost i{ font-size:18px; }
  #railPanelTitle{ font-size:var(--text-2xl); }
  .split-menu{ min-width:220px; padding:8px; }
  .split-menu button{ font-size:var(--text-xl); padding:10px 12px; }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .btn-split .split-main{ border-radius:12px 0 0 12px; }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .btn-split .split-caret{ border-radius:0 12px 12px 0; padding:0 12px; min-height:44px; }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .btn-split.caret-left .split-main{ border-radius:0 12px 12px 0; }
  :is(.topbar, .rail-panel, .sidebar-left, #commentsPanel, #commentPopover, .app-page-body, .home-discovery-overlay, [id$="Modal"], #confirmDialogModal) .btn-split.caret-left .split-caret{ border-radius:12px 0 0 12px; }
  body.editor-body .sidebar-header .split-main, body.editor-body .sidebar-header .split-caret{ height:44px; }
  body.editor-body #presentSplit .split-caret{ height:44px; }
  body.editor-body #presentSplit .split-main{ display:none; }
  body.editor-body #presentSplit .split-caret{
    display:inline-flex; align-items:center; gap:7px; border-left:none; border-radius:12px; padding:0 12px; font-size:var(--text-xs);
  }
  body.editor-body #presentSplit .split-caret::before{
    font-family:"Font Awesome 6 Pro"; font-weight:var(--font-weight-black); content:"\f04b"; font-size:15px;
  }
}
/*! /css/onboarding.css */

.app-nav-help-wrap{ order:9; position:relative; margin-top:auto; margin-bottom:2px; flex-shrink:0; }
.app-nav-help-wrap ~ .app-nav-avatar-wrap{ margin-top:0; }
.app-nav-help-btn{
  position:relative; width:44px; height:44px; padding:0; border:none; border-radius:12px; background:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; color:var(--ui-muted); font-size:var(--text-2xl);
}
.app-nav-help-btn:hover, .app-nav-help-btn[aria-expanded="true"]{ background:var(--md-neutral-background-2-rest); color:var(--ui-text); }
.app-nav-help-ring{
  display:none; position:absolute; inset:5px; border-radius:50%; pointer-events:none;
  background:conic-gradient(var(--ui-accent) calc(var(--onb-pct, 0) * 1%), var(--ui-border) 0);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}
.app-nav-help-btn.has-progress .app-nav-help-ring{ display:block; }
.app-nav-help-wrap .split-menu.app-nav-help-menu{ top:auto; right:auto; bottom:0; left:calc(100% + 8px); min-width:190px; }
.app-nav-help-count{ margin-left:auto; padding-left:16px; font-size:var(--text-xs); color:var(--ui-muted); }

.onboarding-panel{
  position:fixed; z-index:var(--z-panel); width:320px; max-width:calc(100vw - 96px);
  background:var(--ui-surface); color:var(--ui-text); border:1px solid var(--ui-border);
  border-radius:16px; box-shadow:var(--shadow-raised); font-family:var(--font-sans);
  overflow:hidden; animation:onboarding-in .2s cubic-bezier(.2,.8,.2,1);
}
.onboarding-panel[hidden]{ display:none; }
@keyframes onboarding-in{ from{ opacity:0; transform:translateX(-6px); } to{ opacity:1; transform:none; } }
.onboarding-head{ display:flex; align-items:center; gap:8px; padding:10px 8px 10px 14px; }
.onboarding-title-text{ font-size:var(--text-base); font-weight:var(--font-weight-semibold); }
.onboarding-count{ font-size:var(--text-xs); color:var(--ui-muted); margin-right:auto; }
.onboarding-head-btn{ width:24px; height:24px; flex-shrink:0; color:var(--ui-muted); font-size:var(--text-sm); }
.onboarding-head-btn:hover{ color:var(--ui-text); }
.onboarding-body{ border-top:1px solid var(--ui-border); max-height:min(60vh, 460px); overflow-y:auto; }
.onboarding-steps{ list-style:none; margin:0; padding:6px 0; }
.onboarding-step{ display:flex; gap:10px; padding:7px 14px; align-items:flex-start; }
.onboarding-check{
  width:15px; height:15px; border-radius:50%; flex-shrink:0; margin-top:2px; display:flex; align-items:center; justify-content:center;
  border:1.5px solid var(--ui-border-strong); color:transparent; font-size:7px; box-sizing:border-box;
  transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.onboarding-step.done .onboarding-check{ background:var(--ui-accent); border-color:var(--ui-accent); color:#fff; }
.onboarding-step-text{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.onboarding-step-label{ font-size:var(--text-md); font-weight:var(--font-weight-semibold); color:var(--ui-text); }
.onboarding-step.done .onboarding-step-label{ color:var(--ui-muted); text-decoration:line-through; font-weight:var(--font-weight-regular, 400); }
.onboarding-step-hint{ font-size:var(--text-sm); color:var(--ui-muted); line-height:1.4; }
.onboarding-step.done .onboarding-step-hint{ display:none; }
.onboarding-cta{
  align-self:flex-start; margin-top:4px; font-size:var(--text-sm); font-weight:var(--font-weight-semibold);
  color:var(--ui-accent); text-decoration:none;
}
.onboarding-cta:hover{ text-decoration:underline; }
.onboarding-done{ display:flex; flex-direction:column; gap:12px; align-items:flex-start; margin:12px 14px 14px; padding:12px; border-radius:12px; background:var(--ui-surface-2); }
.onboarding-done-msg{ margin:0; font-size:var(--text-md); color:var(--ui-text); line-height:1.45; }
.onboarding-done-actions{ display:flex; gap:8px; }
.onboarding-done-actions .btn{ display:inline-flex; align-items:center; gap:6px; }
.onboarding-foot{ display:flex; align-items:center; justify-content:flex-end; padding:4px 10px 10px; }
.onboarding-dismiss{ color:var(--ui-muted); }
.onboarding-dismiss:hover{ color:var(--ui-text); }
.onboarding-panel.onboarding-celebrate .onboarding-done{ animation:onboarding-pop .5s ease; }
@keyframes onboarding-pop{ 0%{ transform:scale(1); } 40%{ transform:scale(1.03); } 100%{ transform:scale(1); } }

.onboarding-dot{
  display:none; position:fixed; z-index:var(--z-hint); width:10px; height:10px; border-radius:50%; pointer-events:none;
  color:var(--md-color-pink-500); background:currentColor; box-shadow:0 0 0 2px var(--ui-surface);
}
.onboarding-dot.open{ display:block; }
.onboarding-dot::after{
  content:''; position:absolute; inset:-2px; border-radius:50%; border:2px solid currentColor;
  animation:onboarding-dot-pulse 1.6s cubic-bezier(.2,.6,.4,1) infinite;
}
@keyframes onboarding-dot-pulse{ 0%{ transform:scale(.7); opacity:.9; } 100%{ transform:scale(2.4); opacity:0; } }
body.tour-open .onboarding-panel, body.tour-open .onboarding-dot,
body.welcome-open .onboarding-panel, body.welcome-open .onboarding-dot{ display:none; }
@media (max-width: 900px){
  .app-nav-help-wrap, .onboarding-panel, .onboarding-dot{ display:none !important; }
  .app-nav-help-wrap ~ .app-nav-avatar-wrap{ margin-top:auto; }
}
/*! /css/tour.css */
.tour-backdrop{ display:none; position:fixed; inset:0; z-index:var(--z-tour); background:transparent; overflow:hidden; }
.tour-backdrop.open{ display:block; }
.tour-spot{
  display:none; position:fixed; z-index:calc(var(--z-tour) + 1); pointer-events:none; border-radius:10px;
  box-shadow:0 0 0 9999px rgba(20,24,32,0.55), 0 0 0 2px rgba(255,255,255,0.35) inset;
  transition:left .28s cubic-bezier(.2,.8,.2,1), top .28s cubic-bezier(.2,.8,.2,1), width .28s cubic-bezier(.2,.8,.2,1), height .28s cubic-bezier(.2,.8,.2,1);
}
.tour-spot.open{ display:block; }
.tour-card{
  display:none; position:fixed; z-index:calc(var(--z-tour) + 2); width:340px; max-width:calc(100vw - 24px);
  background:var(--ui-surface); color:var(--ui-text); border:1px solid var(--ui-border); border-radius:14px;
  box-shadow:var(--shadow-modal); padding:12px 16px 14px; font-family:var(--font-sans); box-sizing:border-box;
}
.tour-card.open{ display:block; }
.tour-card.tour-card-enter{ animation:tour-card-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes tour-card-in{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
.tour-card::before{
  content:''; position:absolute; width:12px; height:12px; background:var(--ui-surface);
  border:1px solid var(--ui-border); border-right:none; border-bottom:none; transform:rotate(45deg);
}
.tour-card[data-place="bottom"]::before{ top:-7px; left:calc(var(--tour-arrow-x, 50%) - 6px); }
.tour-card[data-place="top"]::before{ bottom:-7px; left:calc(var(--tour-arrow-x, 50%) - 6px); transform:rotate(225deg); }
.tour-card[data-place="right"]::before{ left:-7px; top:calc(var(--tour-arrow-y, 50%) - 6px); transform:rotate(-45deg); }
.tour-card[data-place="left"]::before{ right:-7px; top:calc(var(--tour-arrow-y, 50%) - 6px); transform:rotate(135deg); }
.tour-card-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.tour-count{ font-size:var(--text-xs); font-weight:var(--font-weight-semibold); color:var(--ui-muted); letter-spacing:.04em; }
.tour-close{ width:26px; height:26px; margin-right:-6px; }
.tour-title{ font-size:var(--text-lg); font-weight:var(--font-weight-semibold); color:var(--ui-text); margin-bottom:6px; }
.tour-text{ font-size:var(--text-md); color:var(--ui-text); line-height:1.5; }
.tour-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:14px; }
.tour-skip{
  border:none; background:none; cursor:pointer; padding:4px 0; font-family:inherit;
  font-size:var(--text-sm); color:var(--ui-muted);
}
.tour-skip:hover{ color:var(--ui-text); }
.tour-nav{ display:flex; gap:6px; margin-left:auto; }
body.tour-open .onboarding-panel{ visibility:hidden; }
@media (max-width: 900px){
  .tour-backdrop, .tour-spot, .tour-card{ display:none !important; }
}

.welcome-overlay{
  display:none; position:fixed; inset:0; z-index:var(--z-welcome); background:rgba(20,24,32,0.45);
  align-items:center; justify-content:center; padding:16px; box-sizing:border-box;
}
.welcome-overlay.open{ display:flex; }
.welcome-modal{
  display:grid; grid-template-columns:minmax(0, 1fr) 300px; width:740px; max-width:100%;
  background:var(--md-color-grey-white); border-radius:20px; box-shadow:var(--shadow-modal); overflow:hidden;
  font-family:var(--font-sans); animation:modal-rise-in .32s cubic-bezier(.2,.8,.2,1);
}
.welcome-overlay.no-figure .welcome-modal{ grid-template-columns:minmax(0, 1fr); width:520px; }
.welcome-text{ padding:36px 32px 28px; display:flex; flex-direction:column; min-width:0; }
.welcome-kicker{
  font-size:var(--text-xs); font-weight:var(--font-weight-semibold); letter-spacing:.08em; text-transform:uppercase;
  color:var(--ui-accent); margin-bottom:8px;
}
.welcome-title{ margin:0 0 12px; font-family:var(--font-display); font-size:var(--text-5xl); font-weight:var(--font-weight-semibold); color:var(--ui-text); line-height:1.2; }
.welcome-desc{ margin:0 0 10px; font-size:var(--text-md); color:var(--ui-muted); line-height:1.55; }
.welcome-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:auto; padding-top:18px; }
.welcome-figure{
  margin:16px 16px 16px 0; border-radius:16px; background:var(--ui-surface-2);
  display:flex; align-items:center; justify-content:center; padding:20px; box-sizing:border-box; min-height:260px;
}
.welcome-figure[hidden]{ display:none; }
.welcome-figure img{ width:100%; height:auto; max-height:320px; object-fit:contain; display:block; }
@media (max-width: 900px){
  .welcome-overlay{ display:none !important; }
}

.tour-card.has-figure{ width:360px; }
.tour-figure{ position:relative; height:180px; margin:2px 0 12px; border-radius:10px; background:var(--ui-surface-2); overflow:hidden; }

.ts-scene{
  --ts-ease:cubic-bezier(.45,0,.2,1); --ts-sk:var(--ui-border);
  position:absolute; inset:0; font-family:var(--font-sans); font-size:9px; line-height:1.25; color:var(--ui-text);
  user-select:none; -webkit-user-select:none; pointer-events:none;
}
.ts-ui{ position:absolute; inset:0; transition:opacity .35s ease .3s; }
.ts-scene.is-resetting .ts-ui{ opacity:0; transition:opacity .35s ease; }
.ts-scene.is-seeking *, .ts-scene.is-seeking *::before, .ts-scene.is-seeking *::after{ transition:none !important; }

.ts-scene [data-at]{ transition:opacity .35s ease, transform .45s var(--ts-ease), background-color .3s ease, box-shadow .25s ease, border-color .25s ease; transition-delay:calc(var(--d, 0) * 70ms); }
.ts-scene [data-at]:not(.is-in){ opacity:0; transform:translateY(4px); }
.ts-scene [data-at][data-fx="fade"]:not(.is-in){ transform:none; }
.ts-scene [data-at][data-fx="pop"]{ transform-origin:var(--o, top left); }
.ts-scene [data-at][data-fx="pop"]:not(.is-in){ transform:scale(.9); }
.ts-scene [data-at][data-fx="width"]{ transform-origin:left center; }
.ts-scene [data-at][data-fx="width"]:not(.is-in){ opacity:1; transform:scaleX(0); }
.ts-scene [data-out]{ transition:opacity .3s ease, transform .3s ease, background-color .3s ease, box-shadow .25s ease, border-color .25s ease; }
.ts-scene [data-out].is-out{ opacity:0 !important; transform:scale(.97) !important; }
.ts-scene .ts-swap.is-out, .ts-scene .ts-ph.is-out, .ts-scene .ts-swap[data-at]:not(.is-in){ display:none; }
.ts-scene .is-click:not(.ts-cursor){ transform:scale(.93); box-shadow:0 0 0 3px var(--ui-accent-soft); }

.ts-cursor{ position:absolute; z-index:30; left:var(--x0, 86%); top:var(--y0, 114%); width:0; height:0; transition:left .55s var(--ts-ease), top .55s var(--ts-ease); }
.ts-cursor svg{ position:absolute; left:0; top:0; width:13px; height:auto; overflow:visible; fill:#151A22; stroke:#FFFFFF; stroke-width:1.2; stroke-linejoin:round; transform-origin:1px 1px; transition:transform .15s ease; filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.28)); }
.ts-cursor.is-click svg{ transform:scale(.8); }
.ts-cursor::before{ content:''; position:absolute; left:-9px; top:-9px; width:20px; height:20px; border-radius:50%; background:var(--ui-accent); opacity:0; }
.ts-cursor.is-click::before{ animation:ts-ripple .45s ease-out; }
@keyframes ts-ripple{ from{ opacity:.4; transform:scale(.25); } to{ opacity:0; transform:scale(1.25); } }
.ts-cursor .ts-cur-text{ display:none; left:-6px; top:-7px; width:12px; fill:none; filter:none; }
.ts-cursor .ts-cur-text path{ stroke-linecap:round; }
.ts-cursor .ts-cur-text .o{ stroke:#FFFFFF; stroke-width:3.4; }
.ts-cursor .ts-cur-text .i{ stroke:#151A22; stroke-width:1.4; }
.ts-cursor .ts-cur-text.is-on{ display:block; }
.ts-cursor .ts-cur-arrow:not(.is-on)[data-off], .ts-cursor .ts-cur-arrow:not(.is-on)[data-on]{ display:none; }
.ts-cur-hand{ position:absolute; left:-6px; top:-6px; display:none; font-size:12px; line-height:1; color:#151A22; -webkit-text-stroke:1.4px #FFFFFF; paint-order:stroke fill; filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.28)); }
.ts-cur-hand.is-on{ display:block; }
.ts-cur-hand .g{ display:none; }
.ts-cur-badge{ position:absolute; left:11px; top:11px; width:13px; height:13px; border-radius:50%; background:var(--ui-accent); color:#FFFFFF; font-size:6.5px; display:none; align-items:center; justify-content:center; box-shadow:0 1px 3px rgba(0,0,0,.25); }
.ts-cur-badge.is-on{ display:flex; }

.ts-abs{ position:absolute; }
.ts-anchor{ position:absolute; visibility:hidden; }
.ts-row{ display:flex; align-items:center; gap:6px; min-width:0; }
.ts-col{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.ts-grow{ flex:1; }
.ts-label{ font-family:var(--font-regular); font-size:9px; color:var(--ui-text); white-space:nowrap; }
.ts-muted{ color:var(--ui-muted); white-space:nowrap; }
.ts-sk{ display:block; width:var(--w, 100%); height:5px; border-radius:3px; background:var(--ts-sk); flex-shrink:0; }
.ts-sk.t{ height:7px; background:var(--ui-border-strong); }
.ts-win{ position:absolute; background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:8px; box-shadow:0 1px 2px rgba(var(--shadow-rgb),.06), 0 6px 16px rgba(var(--shadow-rgb),.08); }
.ts-pop{ box-shadow:var(--shadow-popover); z-index:10; }
.ts-btn{ display:inline-flex; align-items:center; justify-content:center; gap:4px; height:18px; padding:0 8px; border-radius:6px; border:1px solid var(--ui-border); background:var(--ui-surface); color:var(--ui-text); font-family:var(--font-regular); font-size:8px; white-space:nowrap; flex-shrink:0; transition:transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.ts-btn i{ font-size:7.5px; }
.ts-btn.p{ background:var(--ui-accent); border-color:var(--ui-accent); color:#FFFFFF; }
.ts-icon-btn{ display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:5px; color:var(--ui-muted); font-size:8.5px; flex-shrink:0; transition:background-color .2s ease, color .2s ease, transform .15s ease; }
.ts-icon-btn.is-on{ background:var(--ui-accent-soft); color:var(--ui-accent); }
.ts-send{ position:absolute; right:6px; bottom:6px; width:18px; height:18px; border-radius:50%; background:var(--ui-accent); color:#FFFFFF; font-size:8px; display:flex; align-items:center; justify-content:center; transition:transform .15s ease, box-shadow .2s ease; }
.ts-field{ transition:border-color .2s ease, box-shadow .2s ease; }
.ts-field.is-on{ border-color:var(--ui-accent); box-shadow:0 0 0 2px var(--ui-accent-soft); }
.ts-input{ display:flex; align-items:center; gap:4px; height:20px; padding:0 7px; border:1px solid var(--ui-border); border-radius:6px; background:var(--ui-surface); font-size:8.5px; white-space:nowrap; overflow:hidden; min-width:0; }
.ts-ph{ color:var(--ui-muted-light); white-space:nowrap; }
.ts-caret{ display:inline-block; width:1px; height:10px; margin-left:1px; vertical-align:-1px; background:var(--ui-accent); animation:ts-blink 1s steps(1) infinite; }
@keyframes ts-blink{ 50%{ opacity:0; } }
.ts-chip{ display:inline-flex; align-items:center; gap:3px; height:14px; padding:0 6px; border-radius:7px; background:var(--ui-surface-2); color:var(--ui-text-2); font-size:7.5px; white-space:nowrap; flex-shrink:0; }
.ts-chip.ok{ background:rgba(27,158,107,.14); color:var(--ui-success); }
.ts-chip.ac{ background:var(--ui-accent-soft); color:var(--ui-accent); }
.ts-num{ display:inline-flex; align-items:center; justify-content:center; width:13px; height:13px; border-radius:4px; background:var(--ui-accent-soft); color:var(--ui-accent); font-family:var(--font-regular); font-size:7px; flex-shrink:0; }
.ts-avatar{ display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; border-radius:50%; background:var(--c, var(--ui-accent)); color:#FFFFFF; font-family:var(--font-regular); font-size:7px; flex-shrink:0; transition:background-color .4s ease, transform .15s ease, box-shadow .2s ease; }
.ts-avatar i{ font-size:6.5px; }
.ts-key{ display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; border-radius:5px; border:1px solid var(--ui-border-strong); border-bottom-width:2px; background:var(--ui-surface); color:var(--ui-text); font-family:var(--font-regular); font-size:8.5px; box-shadow:var(--shadow-sm); }
.ts-keys{ position:absolute; display:flex; gap:3px; z-index:12; }
.ts-menu{ position:absolute; display:flex; flex-direction:column; gap:1px; padding:4px; background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:8px; box-shadow:var(--shadow-popover); z-index:12; }
.ts-mi{ display:flex; align-items:center; gap:6px; height:18px; padding:0 6px; border-radius:5px; font-size:8px; white-space:nowrap; transition:background-color .2s ease; }
.ts-mi i{ width:10px; text-align:center; font-size:8px; color:var(--ui-muted); }
.ts-mi.is-on{ background:var(--ui-surface-2); transition-delay:.4s; }
.ts-sep{ height:1px; margin:2px 4px; background:var(--ui-border); }
.ts-seg{ display:flex; gap:2px; padding:2px; border-radius:7px; background:var(--ui-surface-2); }
.ts-seg > span{ display:inline-flex; align-items:center; justify-content:center; gap:3px; height:15px; padding:0 7px; border-radius:5px; font-size:7.5px; color:var(--ui-muted); white-space:nowrap; transition:background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .15s ease; }
.ts-seg > span i{ font-size:7px; }
.ts-seg > span.is-on{ background:var(--ui-surface); color:var(--ui-text); font-family:var(--font-regular); box-shadow:0 1px 2px rgba(var(--shadow-rgb), .16); }
.ts-pills{ display:flex; gap:4px; }
.ts-pills > span{ display:inline-flex; align-items:center; height:16px; padding:0 8px; border-radius:8px; border:1px solid var(--ui-border); background:var(--ui-surface); font-size:7.5px; color:var(--ui-text-2); white-space:nowrap; transition:background-color .25s ease, color .25s ease, border-color .25s ease, transform .15s ease; }
.ts-pills > span.is-on{ background:var(--ui-pill-active); border-color:var(--ui-pill-active); color:var(--ui-pill-active-fg); }
.ts-tabs{ display:flex; gap:10px; border-bottom:1px solid var(--ui-border); }
.ts-tabs > span{ padding:0 1px 4px; font-size:8px; color:var(--ui-muted); border-bottom:1.5px solid transparent; margin-bottom:-1px; white-space:nowrap; transition:color .25s ease, border-color .25s ease; }
.ts-tabs > span.is-on{ color:var(--ui-text); border-bottom-color:var(--ui-accent); }
.ts-toast{ position:absolute; display:flex; align-items:center; gap:6px; height:26px; padding:0 10px; border-radius:9px; background:var(--ui-surface); box-shadow:var(--shadow-soft); font-size:8.5px; white-space:nowrap; z-index:14; }
.ts-toast > i{ color:var(--ui-success); font-size:10px; }
.ts-veil{ position:absolute; inset:0; background:rgba(20,24,32,.35); z-index:9; }
.ts-typing{ display:inline-flex; gap:2px; }
.ts-typing i{ width:4px; height:4px; border-radius:50%; background:var(--ui-muted); animation:ts-dot 1s ease-in-out infinite; }
.ts-typing i:nth-child(2){ animation-delay:.15s; }
.ts-typing i:nth-child(3){ animation-delay:.3s; }
@keyframes ts-dot{ 0%, 60%, 100%{ opacity:.35; transform:none; } 30%{ opacity:1; transform:translateY(-2px); } }
.ts-omega{ display:inline-block; width:12px; height:12px; flex-shrink:0; background:var(--ui-ai-gradient); -webkit-mask:url('/assets/logo/logo-ai-solid.svg') center / contain no-repeat; mask:url('/assets/logo/logo-ai-solid.svg') center / contain no-repeat; }
.ts-progress{ height:4px; border-radius:2px; background:var(--ui-surface-2); overflow:hidden; }
.ts-progress > i{ display:block; height:100%; border-radius:inherit; background:var(--ui-accent); transform-origin:left center; transition:transform 1.2s var(--ts-ease); }
.ts-progress[data-at]:not(.is-in) > i{ transform:scaleX(0); }
.ts-progress[data-at]{ opacity:1 !important; transform:none !important; }
.ts-img{ background:linear-gradient(135deg, #B5C7FB 0%, #8E7BF0 55%, #FC89FF 100%); position:relative; overflow:hidden; }
.ts-img::after{ content:''; position:absolute; left:-10%; right:-10%; bottom:-30%; height:65%; border-radius:50% 50% 0 0; background:rgba(255,255,255,.28); }
.ts-img.b{ background:linear-gradient(135deg, #A6E3CF 0%, #3FB68B 100%); }
.ts-img.c{ background:linear-gradient(135deg, #FFD7A8 0%, #F08A4B 100%); }
.ts-img.d{ background:linear-gradient(135deg, #C9D6E8 0%, #6F86A8 100%); }

.ts-nav{ position:absolute; left:0; top:0; bottom:0; width:38px; display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 0 7px; background:var(--ui-surface); border-right:1px solid var(--ui-border); z-index:4; }
.ts-nav-logo{ display:block; width:18px; height:18px; margin-bottom:3px; }
.ts-nav > *{ flex-shrink:0; }
.ts-nav .ts-icon-btn{ width:22px; height:22px; font-size:9.5px; }
.ts-nav .ts-avatar{ width:18px; height:18px; }
.ts-nav-help{ position:relative; margin-top:auto; width:20px; height:20px; display:flex; align-items:center; justify-content:center; font-size:10px; color:var(--ui-muted); }
.ts-nav-help::before{
  content:''; position:absolute; inset:1px; border-radius:50%;
  background:conic-gradient(var(--ui-accent) 38%, var(--ui-border) 0);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
}
.ts-nav .ts-icon-btn.is-on{ background:var(--ui-accent); color:#FFFFFF; }

.ts-slide, .ts-thumb{
  --ui-surface:#FFFFFF; --ui-surface-2:#F2F5F9; --ui-border:#E1E5EB; --ui-border-strong:#D3D9E2; --ui-text:#2F353E;
  --ui-accent:#0040DE; --ui-accent-soft:#EEF3FE; --ts-sk:#E1E5EB;
  position:absolute; container-type:inline-size; aspect-ratio:16 / 9; overflow:hidden; background:var(--ui-surface); border-radius:4px;
  box-shadow:0 0 0 1px rgba(20,30,50,.06), 0 2px 6px rgba(20,30,50,.08); transition:background-color .4s ease, box-shadow .25s ease, transform .25s ease;
}
.ts-thumb{ position:relative; border-radius:3px; outline:1.5px solid transparent; outline-offset:1.5px; transition:background-color .4s ease, box-shadow .25s ease, transform .25s ease, outline-color .25s ease; }
.ts-thumb.ts-abs{ position:absolute; }
.ts-thumb.is-on{ outline-color:var(--ui-accent); }
.ts-s-title{ position:absolute; left:7%; top:9%; width:var(--w, 42%); height:5cqw; border-radius:2.5cqw; background:var(--ui-border-strong); }
.ts-s-text{ position:absolute; left:7%; top:7%; font-family:var(--font-display); font-size:6cqw; line-height:1.2; color:var(--ui-text); white-space:nowrap; }
.ts-s-card{ position:absolute; display:flex; flex-direction:column; gap:2.4cqw; padding:3.2cqw; border-radius:2.6cqw; background:var(--ui-surface-2); overflow:hidden; transition:left .7s var(--ts-ease), top .7s var(--ts-ease), width .7s var(--ts-ease), height .7s var(--ts-ease), background-color .4s ease, box-shadow .25s ease, opacity .35s ease, transform .45s var(--ts-ease); }
.ts-s-dot{ width:5.5cqw; height:5.5cqw; border-radius:1.6cqw; background:var(--ui-accent-soft); box-shadow:inset 0 0 0 1.4cqw var(--ui-accent-soft), inset 0 0 0 3cqw var(--ui-accent); flex-shrink:0; }
.ts-s-line{ display:block; width:var(--w, 100%); height:2.4cqw; border-radius:1.2cqw; background:var(--ts-sk); flex-shrink:0; }
.ts-s-num{ display:block; width:var(--w, 62%); height:6.5cqw; border-radius:2cqw; background:var(--ui-accent); flex-shrink:0; }
.ts-s-bars{ display:flex; align-items:flex-end; gap:2cqw; flex:1; min-height:0; }
.ts-s-bars i{ flex:1; height:var(--v); border-radius:1cqw 1cqw 0 0; background:var(--ui-accent); transform-origin:bottom; transition:transform .55s var(--ts-ease); transition-delay:calc((var(--d, 0) + var(--i, 0)) * 70ms); }
.ts-s-bars[data-at]{ opacity:1 !important; transform:none !important; }
.ts-s-bars[data-at]:not(.is-in) i{ transform:scaleY(0); }
.ts-s-img{ position:absolute; border-radius:2.6cqw; }
.ts-k-cover{
  --h-from:#F2F5F9; --h-to:#CFE0FB; --h-fg:#0040DE; --h-veil:226,235,250; --h-sub:rgba(47,53,62,.2);
  background-color:#FFFFFF; background-image:linear-gradient(160deg, var(--h-from) 0%, var(--h-to) 100%);
}
.ts-k-teal{ --h-to:#C2F4E6; --h-fg:#077E63; --h-veil:218,244,239; }
.ts-k-pink{ --h-to:#FFCAD7; --h-fg:#C73B61; --h-veil:248,223,232; }
.ts-k-dark{ --h-from:#1E2430; --h-to:rgba(107,138,247,.28); --h-fg:#6B8AF7; --h-veil:30,36,48; --h-sub:rgba(255,255,255,.2); background-color:#1E2430; }
.ts-c-rule, .ts-c-eyebrow, .ts-c-sub{ position:absolute; left:6.25%; border-radius:1.2cqw; }
.ts-c-rule{ top:10%; width:5%; height:max(1px, .6cqw); background:var(--h-fg); }
.ts-c-eyebrow{ top:15%; width:22%; height:2cqw; background:var(--h-fg); opacity:.4; }
.ts-k-cover .ts-c-title{ left:6.25%; top:44%; width:var(--w, 56%); height:6cqw; border-radius:3cqw; background:var(--h-fg); }
.ts-k-photo .ts-c-title{ --w:44%; }
.ts-c-sub{ top:82%; width:30%; height:2.4cqw; background:var(--h-sub); }
.ts-c-photo{ position:absolute; inset:0; }
.ts-c-photo::before{ content:''; position:absolute; right:11%; top:16%; width:13cqw; height:13cqw; border-radius:50%; background:rgba(255,255,255,.6); }
.ts-c-veil{ position:absolute; left:0; top:0; bottom:0; width:66.67%; background:rgba(var(--h-veil), .88); }
.ts-k-section{ background:var(--ui-surface-2); }

.ts-deck{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.ts-deck .ts-thumb{ width:100%; }
.ts-deck-name{ display:flex; align-items:center; gap:4px; height:9px; font-size:7.5px; white-space:nowrap; }
.ts-deck-name .fa-star{ color:#E0A100; font-size:7px; margin-left:auto; }

.ts-panel{ position:absolute; top:0; right:0; bottom:0; display:flex; flex-direction:column; gap:7px; padding:10px; background:var(--ui-surface); border-left:1px solid var(--ui-border); z-index:3; }
.ts-panel-l{ position:absolute; top:0; left:0; bottom:0; background:var(--ui-surface); border-right:1px solid var(--ui-border); z-index:3; }
.ts-panel-title{ font-family:var(--font-regular); font-size:9.5px; color:var(--ui-text); display:flex; align-items:center; gap:5px; }
.ts-field-label{ font-size:7.5px; color:var(--ui-muted); }
.ts-stepper{ display:flex; align-items:center; height:18px; border:1px solid var(--ui-border); border-radius:6px; overflow:hidden; }
.ts-stepper > span{ display:flex; align-items:center; justify-content:center; width:18px; height:100%; color:var(--ui-muted); font-size:7px; transition:background-color .2s ease, transform .15s ease; }
.ts-stepper > b{ flex:1; text-align:center; font-family:var(--font-regular); font-weight:400; font-size:8.5px; }
.ts-swatch{ width:16px; height:16px; border-radius:5px; border:1px solid var(--ui-border); flex-shrink:0; transition:box-shadow .2s ease, transform .15s ease; }
.ts-swatch.is-on{ box-shadow:0 0 0 2px var(--ui-surface), 0 0 0 3.5px var(--ui-accent); }
.ts-toggle{ width:20px; height:11px; border-radius:6px; background:var(--ui-accent); position:relative; flex-shrink:0; }
.ts-toggle::after{ content:''; position:absolute; right:1.5px; top:1.5px; width:8px; height:8px; border-radius:50%; background:#FFFFFF; }
.ts-tile{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; border-radius:6px; background:var(--ui-surface-2); font-size:7px; color:var(--ui-text-2); white-space:nowrap; transition:transform .15s ease, box-shadow .2s ease; }
.ts-tile i{ font-size:9px; color:var(--ui-text); }
.ts-ghost{ position:absolute; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; border-radius:6px; background:var(--ui-surface); box-shadow:var(--shadow-popover), 0 0 0 1.5px var(--ui-accent); font-size:7px; z-index:20; transition:left .7s var(--ts-ease), top .7s var(--ts-ease), opacity .3s ease, transform .3s ease; }
.ts-ghost i{ font-size:9px; color:var(--ui-accent); }
.ts-drop{ position:absolute; border-radius:2.6cqw; border:1px dashed var(--ui-border-strong); transition:border-color .25s ease, background-color .25s ease; }
.ts-drop.is-on{ border-color:var(--ui-accent); background:var(--ui-accent-soft); transition-delay:.35s; }
.ts-topbar{ display:flex; align-items:center; gap:6px; padding:0 8px; }
.ts-topbar .ts-btn{ padding:0 7px; }
.ts-topbar .ts-split .ts-btn:last-child{ padding:0 4px; }
.ts-topbar-logo{ display:block; width:14px; height:14px; flex-shrink:0; }
.ts-avatars{ display:flex; }
.ts-avatars .ts-avatar{ box-shadow:0 0 0 1.5px var(--ui-surface); }
.ts-avatars .ts-avatar + .ts-avatar{ margin-left:-4px; }
.ts-split{ display:inline-flex; }
.ts-split .ts-btn:first-child{ border-radius:6px 0 0 6px; }
.ts-split .ts-btn:last-child{ border-radius:0 6px 6px 0; border-left-color:rgba(255,255,255,.35); padding:0 5px; }
.ts-split .ts-btn:not(.p):last-child{ border-left-color:var(--ui-border); }
.ts-bubble{ padding:5px 7px; border-radius:8px; font-size:8px; line-height:1.35; }
.ts-bubble.me{ align-self:flex-end; background:var(--ui-accent-soft); color:var(--ui-text); border-bottom-right-radius:3px; }
.ts-mention{ color:var(--ui-accent); font-family:var(--font-regular); }
.ts-pin{ position:absolute; width:18px; height:18px; border-radius:50% 50% 50% 2px; background:var(--ui-accent); color:#FFFFFF; display:flex; align-items:center; justify-content:center; font-size:7px; box-shadow:0 0 0 1.5px #FFFFFF, var(--shadow-sm); z-index:6; }

.ts-scene .ts-ghost{ transition:left .55s var(--ts-ease), top .55s var(--ts-ease), opacity .3s ease, transform .3s ease; }
.ts-scene .ts-s-card{ transition:left .55s var(--ts-ease), top .55s var(--ts-ease), width .55s var(--ts-ease), height .55s var(--ts-ease), background-color .4s ease, box-shadow .25s ease, opacity .35s ease, transform .45s var(--ts-ease); transition-delay:calc(var(--d, 0) * 70ms); }

.ts-flip{
  --ui-surface:#FFFFFF; --ui-surface-2:#F2F5F9; --ui-border:#E1E5EB; --ui-border-strong:#D3D9E2; --ui-text:#2F353E; --ui-text-2:#626B7D;
  --ui-muted:#666F80; --ui-muted-light:#A6AEBC; --ui-accent:#0040DE; --ui-accent-soft:#EEF3FE; --ui-pill-active:#2F353E; --ui-pill-active-fg:#FFFFFF;
  --ts-sk:#E1E5EB; --shadow-rgb:20,30,50; --shadow-popover:0 8px 24px rgba(20,30,50,0.24);
  background:var(--ui-surface-2); transition:background-color .45s ease;
}
.ts-flip.is-on{
  --ui-surface:#1A1F27; --ui-surface-2:#242A34; --ui-border:#2E3540; --ui-border-strong:#3D4553; --ui-text:#E6EAF1; --ui-text-2:#B5BECC;
  --ui-muted:#8A93A2; --ui-muted-light:#626B7D; --ui-accent:#6B8AF7; --ui-accent-soft:rgba(107,138,247,0.18); --ui-pill-active:#E6EAF1; --ui-pill-active-fg:#151A22;
  --ts-sk:#2E3540; --shadow-rgb:0,0,0; --shadow-popover:0 0 0 1px rgba(255,255,255,0.08), 0 12px 32px rgba(0,0,0,0.65);
}
.ha-color{ --ha-c:#7B5CE0; }
.ha-color.is-on{ --ha-c:#1B9E6B; }
.ts-avatar.ha-av{ --c:var(--ha-c, #7B5CE0); }
.ha-big{ position:relative; flex-shrink:0; }
.ha-big .ts-avatar{ width:30px; height:30px; font-size:12px; }
.ha-pen{ position:absolute; right:-3px; bottom:-3px; width:13px; height:13px; border-radius:50%; background:var(--ui-surface); border:1px solid var(--ui-border); color:var(--ui-text); font-size:5.5px; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-xs); transition:transform .15s ease, box-shadow .2s ease; }
.ha-field{ display:flex; align-items:center; gap:6px; height:16px; padding:0 6px; border:1px solid var(--ui-border); border-radius:5px; font-size:6.5px; color:var(--ui-muted); }
.ha-modal .ts-seg > span, .ha-avmodal .ts-seg > span{ flex:1; }
.ha-pane{ height:40px; }
.ha-drop{ height:40px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:1px dashed var(--ui-border-strong); border-radius:7px; font-size:6px; color:var(--ui-text-2); }
.ha-sw{ width:15px; height:15px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#FFFFFF; font-family:var(--font-display); font-style:normal; font-size:6.5px; transition:box-shadow .2s ease, transform .15s ease; }
.ha-sw.is-on{ box-shadow:0 0 0 1.5px var(--ui-surface), 0 0 0 2.5px var(--ui-text); }
.ts-flip .ts-win, .ts-flip .ts-nav, .ts-flip .ts-menu, .ts-flip .ts-mi, .ts-flip .ts-label, .ts-flip .ts-sk{ transition:background-color .45s ease, color .45s ease, border-color .45s ease, opacity .35s ease, transform .45s var(--ts-ease); }

.ts-home-chat .hc-box{ left:34px; top:65px; width:260px; height:50px; transition:top .6s var(--ts-ease), height .6s var(--ts-ease), border-color .2s ease, box-shadow .2s ease; }
.ts-home-chat.q4 .hc-box{ top:8px; height:30px; }
.hc-box .ts-send{ right:6px; bottom:6px; }
.hc-outline{ left:34px; top:44px; width:260px; gap:4px; }
.hc-ol-head{ height:12px; gap:7px; font-size:7px; color:var(--ui-muted); }
.hc-ol-head .ts-label{ font-size:8.5px; }
.hc-card{ display:flex; align-items:flex-start; gap:6px; padding:4px 8px; border:1px solid var(--ui-border); border-radius:6px; background:var(--ui-surface); }
.hc-card.type-cover{ background:color-mix(in srgb, var(--ui-accent) 6%, var(--ui-surface)); border-color:color-mix(in srgb, var(--ui-accent) 22%, var(--ui-surface)); }
.hc-num{ width:9px; flex-shrink:0; margin-top:1px; text-align:center; font-family:var(--font-regular); font-size:7px; color:var(--ui-muted); }
.hc-num i{ font-size:6.5px; }
.hc-card.type-cover .hc-num, .hc-card.type-cover .hc-badge{ color:var(--ui-accent); }
.hc-fields{ display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.hc-badge{ display:inline-flex; align-items:center; gap:3px; font-family:var(--font-regular); font-size:5.5px; letter-spacing:.04em; text-transform:uppercase; color:var(--ui-muted); }
.hc-badge i{ font-size:5px; }
.hc-title{ font-family:var(--font-regular); font-size:8px; color:var(--ui-text); white-space:nowrap; }
.hc-sum{ height:4px; margin-top:1px; }
.ts-home-chat .hc-go{ display:flex; width:100%; height:18px; margin-top:2px; }
.hk-editor{ overflow:hidden; }
.hk-gutter{ position:absolute; left:0; top:0; bottom:0; width:18px; padding-top:8px; text-align:center; font-family:var(--font-mono); font-size:7px; line-height:12px; color:var(--ui-muted-light); background:var(--ui-surface-2); border-radius:8px 0 0 8px; }
.hk-lines{ position:absolute; left:26px; top:8px; font-family:var(--font-mono); font-size:7.5px; line-height:12px; color:var(--ui-text-2); white-space:nowrap; }
.hk-k{ color:var(--ui-accent); }
.hk-v{ display:inline-block; vertical-align:middle; width:var(--w); height:4px; border-radius:2px; background:var(--ui-border-strong); }
.hb-cta{ height:22px; padding:0 12px; font-size:8.5px; }
.hb-ppt, .ts-toast > i.hb-ppt{ font-size:16px; color:#D24726; }
.hb-pane{ height:60px; }
.hb-drop{ height:60px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:0 18px; border:1px dashed var(--ui-border-strong); border-radius:7px; font-size:6.5px; line-height:1.35; color:var(--ui-text-2); text-align:center; transition:border-color .25s ease, background-color .25s ease; }
.hb-drop i, .ha-drop i{ font-size:11px; color:var(--ui-muted); }
.hb-drop u, .ha-drop u{ color:var(--ui-accent); text-decoration:none; }
.hb-drop.is-on{ border-color:var(--ui-accent); background:var(--ui-accent-soft); transition-delay:.35s; }
.ts-btn.hb-all{ height:15px; padding:0 6px; font-size:7px; }
.hb-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; }
.hb-pick{ position:relative; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:6px; color:var(--ui-muted); }
.hb-pick .ts-thumb{ width:100%; }
.hb-check{ position:absolute; left:3px; top:3px; z-index:1; width:8px; height:8px; border-radius:2px; background:#FFFFFF; border:1px solid #D3D9E2; display:flex; align-items:center; justify-content:center; font-size:5px; color:transparent; transition:background-color .2s ease, border-color .2s ease, color .2s ease; }
.hb-check.is-on{ background:var(--ui-accent); border-color:var(--ui-accent); color:#FFFFFF; }
.ts-btn.hb-go{ opacity:.45; transition:opacity .2s ease, transform .15s ease, box-shadow .2s ease; }
.ts-btn.hb-go.is-on{ opacity:1; }
.ts-home-blank .hb-file{ left:226px; top:142px; width:92px; height:22px; flex-direction:row; gap:5px; font-size:7px; }
.ts-home-blank .hb-file i{ font-size:9px; }
.ts-home-blank.q9 .hb-file{ left:118px; top:74px; }
.ts-home-templates .ts-deck{ transition:transform .25s var(--ts-ease); }
.ts-home-templates .ht-c2.is-on{ transform:translateY(-3px); transition-delay:.35s; }
.ts-home-templates .ht-c2.is-on .ts-thumb{ outline-color:var(--ui-accent); box-shadow:var(--shadow-sm); transition-delay:.35s; }
.hd-grid{ left:22px; top:48px; width:284px; display:grid; grid-template-columns:repeat(4, 1fr); gap:9px 8px; }
.hd-av{ width:9px; height:9px; font-size:5px; }
.has-grid{ left:52px; top:58px; width:262px; display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; }
.has-tile{ display:block; aspect-ratio:16 / 9; border-radius:3px; }
.hdn-grid{ left:52px; top:62px; width:262px; display:grid; grid-template-columns:repeat(4, 1fr); gap:9px 8px; }
.hcr-hint{ position:absolute; left:0; right:0; top:44%; text-align:center; font-size:5.5cqw; color:#8A93A2; }
.hcr-rail{ position:absolute; right:0; top:25px; bottom:0; width:22px; display:flex; flex-direction:column; align-items:center; gap:3px; padding-top:6px; border-left:1px solid var(--ui-border); }
.hcr-rail .ts-icon-btn{ width:16px; height:16px; font-size:7.5px; }

.es-n{ position:absolute; left:11px; font-size:7px; color:var(--ui-muted); }
.ts-ed-slides .es-t{ position:absolute; left:28px; width:60px; border-radius:3px; transition:top .55s var(--ts-ease), transform .25s ease, opacity .35s ease; }
.ts-ed-slides .es-t1{ top:32px; }
.ts-ed-slides .es-t2{ top:69px; }
.ts-ed-slides .es-t3{ top:106px; }
.ts-ed-slides .es-tn{ top:143px; z-index:2; }
.ts-ed-slides.q4 .es-tn{ top:106px; }
.ts-ed-slides.q4 .es-t3{ top:143px; }
.ts-ed-slides .es-t.is-on{ transform:scale(1.06) rotate(-2deg); z-index:4; }
.ts-ed-slides .es-t.is-on .ts-thumb{ box-shadow:var(--shadow-popover); }

.ts-ed-stage .est-title{ font-size:5cqw; padding:0 .6cqw; margin-left:-.6cqw; border-radius:.8cqw; outline:1px dashed transparent; outline-offset:2px; transition:outline-color .2s ease; }
.ts-ed-stage .est-title.is-on{ outline-color:var(--ui-accent); }
.ts-ed-stage.q6 .est-old{ background:var(--ui-accent-soft); }
.ts-ed-stage .est-a, .ts-ed-stage .est-b, .ts-ed-stage .est-c{ top:30%; width:26.5%; height:58%; }
.ts-ed-stage .est-a{ left:7%; }
.ts-ed-stage .est-b{ left:36.75%; }
.ts-ed-stage .est-c{ left:66.5%; z-index:2; }
.ts-ed-stage.q3 .est-c{ left:7%; }
.ts-ed-stage.q3 .est-a{ left:36.75%; }
.ts-ed-stage.q3 .est-b{ left:66.5%; }
.ts-ed-stage .est-c.is-on{ box-shadow:0 0 0 1.5px var(--ui-accent); }
.ts-ed-stage.q3:not(.q4) .est-c{ transform:scale(1.03); box-shadow:0 0 0 1.5px var(--ui-accent), 0 8px 20px rgba(20,30,50,.22); }
.est-h{ position:absolute; right:1.2cqw; bottom:1.2cqw; width:2.4cqw; height:2.4cqw; border-radius:.6cqw; background:var(--ui-accent); opacity:0; transition:opacity .2s ease; }
.est-c.is-on .est-h{ opacity:1; }

.ts-ed-modes .em-title{ font-size:5cqw; padding:0 .6cqw; margin-left:-.6cqw; border-radius:.8cqw; outline:1px dashed transparent; outline-offset:2px; transition:outline-color .2s ease; }
.ts-ed-modes .em-title.is-on{ outline-color:var(--ui-accent); }
.ts-ed-modes .em-a, .ts-ed-modes .em-b{ top:32%; width:26.5%; height:58%; }
.ts-ed-modes .em-a{ left:7%; z-index:2; }
.ts-ed-modes .em-b{ left:36.75%; }
.ts-ed-modes.q2 .em-a{ left:36.75%; }
.ts-ed-modes.q2 .em-b{ left:7%; }
.ts-ed-modes .em-a.is-on{ transform:scale(1.03); box-shadow:0 0 0 1.5px var(--ui-accent), 0 8px 20px rgba(20,30,50,.22); }
.ts-ed-modes.q1c:not(.q3) .ts-cur-hand .o{ display:none; }
.ts-ed-modes.q1c:not(.q3) .ts-cur-hand .g{ display:inline; }

.ts-ed-layout .el-a, .ts-ed-layout .el-b, .ts-ed-layout .el-c{ top:32%; height:58%; }
.ts-ed-layout.q3c .el-a, .ts-ed-layout.q3c .el-b, .ts-ed-layout.q3c .el-c{ top:42%; height:48%; }
.ts-ed-layout .ts-s-title{ transition:top .45s var(--ts-ease), height .45s var(--ts-ease), width .45s var(--ts-ease); }
.ts-ed-layout.q3c .ts-s-title{ top:14%; height:7cqw; width:56%; }
.el-prev{ display:flex; flex-direction:column; gap:2px; align-self:center; width:96px; aspect-ratio:16 / 9; padding:4px; border:1px solid var(--ui-border); border-radius:6px; background:var(--ui-surface-2); }
.el-cell{ display:block; min-width:0; background:var(--ui-surface); border:1px solid var(--ui-border); border-radius:2px; }
.el-tr{ height:28%; flex-shrink:0; transition:height .45s var(--ts-ease); }
.ts-ed-layout.q3c .el-tr{ height:42%; }
.el-crow{ flex:1; display:flex; gap:2px; }
.el-crow .el-cell{ flex:1 1 0; transition:flex-grow .45s var(--ts-ease), opacity .3s ease, margin .45s var(--ts-ease); }
.el-crow .el-c3{ flex-grow:0; opacity:0; margin-left:-2px; }
.ts-ed-layout.q1c .el-crow .el-c3{ flex-grow:1; opacity:1; margin-left:0; }
.el-cols > span{ flex:1; padding:0; }
.el-lrow{ font-size:7px; color:var(--ui-text-2); white-space:nowrap; }
.el-lrow .ts-seg > span{ padding:0 5px; }
.ts-ed-layout .el-a{ left:7%; width:41.5%; }
.ts-ed-layout .el-b{ left:51.5%; width:41.5%; }
.ts-ed-layout .el-c{ left:66.5%; width:26.5%; }
.ts-ed-layout.q1c .el-a{ width:26.5%; }
.ts-ed-layout.q1c .el-b{ left:36.75%; width:26.5%; }

.ec-tiles, .ei-tiles{ display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.ec-tiles .ts-tile{ height:34px; }
.ec-ghost{ left:265px; top:69px; width:53px; height:34px; }
.ts-ed-components.q3 .ec-ghost{ left:113px; top:81px; }
.ei-tile{ display:block; position:relative; height:34px; border-radius:5px; }
.ei-new{ background:var(--ui-surface-2); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.ei-new .ts-img{ position:absolute; inset:0; }
.ei-ghost{ left:265px; top:134px; width:53px; height:34px; }
.ts-ed-images.q5 .ei-ghost{ left:113px; top:72px; }
.ei-tool{ display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; flex-shrink:0; border:1px solid var(--ui-border); border-radius:5px; font-size:7.5px; color:var(--ui-text-2); transition:transform .15s ease, box-shadow .2s ease; }

.ts-ed-props .ep-card{ left:7%; top:30%; width:41.5%; height:58%; outline:1.5px solid var(--ui-accent); outline-offset:1.5px; }
.ep-num{ font-family:var(--font-display); font-size:7cqw; line-height:1.1; color:var(--ui-accent); white-space:nowrap; transition:font-size .45s var(--ts-ease), color .3s ease; }
.ts-ed-props.q2 .ep-card{ background:var(--ui-accent); }
.ts-ed-props.q2 .ep-card .ts-s-line{ background:rgba(255,255,255,.45); }
.ts-ed-props.q2 .ep-num{ color:#FFFFFF; }
.ts-ed-props.q4 .ep-num{ font-size:10.5cqw; }
.ts-ed-props .ts-panel .ts-input{ width:100%; }

.ts-ed-comments .ecm-card{ outline:1px dashed transparent; outline-offset:1px; transition:outline-color .2s ease; }
.ts-ed-comments .ecm-card.is-on{ outline-color:var(--ui-accent); }
.ecm-input{ position:relative; display:block; height:32px; padding:5px 22px 5px 7px; white-space:normal; line-height:1.35; font-size:8px; }

.ts-ed-omega .ts-bubble.me{ max-width:80%; }
.eom-input .ts-send{ position:absolute; }

.epr-con{ position:absolute; inset:0; background:var(--ui-surface-2); z-index:15; }
.epr-label{ font-size:7px; letter-spacing:.04em; text-transform:uppercase; color:var(--ui-muted); }
.epr-timer{ font-family:var(--font-regular); font-size:12px; color:var(--ui-text); }
.epr-con .ts-icon-btn{ color:var(--ui-text); background:var(--ui-surface); border:1px solid var(--ui-border); }

.eti-name{ display:inline-flex; align-items:center; height:22px; padding:0 6px; border:1px solid transparent; border-radius:6px; font-family:var(--font-regular); font-size:9px; white-space:nowrap; }
.ts-ed-title.q2 .eti-old{ background:var(--ui-accent-soft); }
