@charset "utf-8";

  :root {
    --r-pill:999px;
    --r-tile:16px;
    --r-field:14px;
    --r-pop:18px;
    --r-mark:12px;
    --r-chip:8px;
    --r-dlg:28px;
  }

  .door {
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,0.82fr);
    gap:clamp(28px,5vw,64px); align-items:center;
    min-height:min(64vh,560px); padding:clamp(40px,7vw,88px) 0 clamp(56px,8vw,104px);
  }
  .door-kicker {
    font-size:11px; font-weight:700; letter-spacing:0.28em;
    color:var(--brand-500); line-height:1; margin-bottom:22px;
  }
  .door h1 {
    font-family:var(--font-display); font-weight:500;
    font-size:clamp(30px,5.6vw,56px); line-height:1.35; margin:0 0 22px;
    letter-spacing:0.01em;
  }
  .door-lead { margin:0; font-size:clamp(13.5px,1.6vw,15px); color:var(--ink-soft); line-height:2.1; max-width:26em; }
  .door .msg { margin:20px 0 0; font-size:13.5px; color:var(--accent); line-height:1.9; }
  .door .btn { margin-top:32px; }
  .door-fine { margin:26px 0 0; font-size:11.5px; color:var(--ink-soft); line-height:1.95; max-width:34em; }

  .door-art { display:flex; justify-content:center; }
  .door-art .blob {
    width:min(100%,420px); aspect-ratio:1.05 / 1;
    background:var(--surface-sunken); clip-path:url(#bl-door);
    display:flex; align-items:center; justify-content:center;
  }
  .door-art img { width:44%; max-width:190px; height:auto; display:block; border-radius:50%; }
  @supports not (aspect-ratio: 1 / 1) { .door-art .blob { height:380px; } }

  @media (max-width:900px) {
    .door { grid-template-columns:minmax(0,1fr); min-height:0; gap:24px; text-align:center; }
    .door-copy { order:2; }
    .door-art  { order:1; }
    .door-art .blob { width:min(72%,300px); }
    .door-lead, .door-fine { margin-left:auto; margin-right:auto; }
  }

  .app { padding:clamp(30px,4.5vw,56px) 0 clamp(64px,9vw,104px); }

  .app-bar {
    display:flex; align-items:center; gap:14px; flex-wrap:wrap;
    margin-bottom:clamp(20px,2.6vw,28px);
  }
  .app-kicker {
    font-size:10.5px; font-weight:700; letter-spacing:.22em;
    color:var(--brand-500); line-height:1; margin-right:auto;
  }
  .app-me { display:flex; align-items:center; gap:10px; min-width:0; }
  .app-me .ava {
    width:30px; height:30px; border-radius:50%; overflow:hidden; flex-shrink:0;
    background:var(--brand-200); color:var(--brand-700);
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-display); font-size:13px; line-height:1;
  }
  .app-me .ava img { width:100%; height:100%; object-fit:cover; display:block; }
  .app-me .nm {
    font-size:12.5px; font-weight:700; min-width:0; max-width:16em;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }

  .app-mast {
    display:flex; align-items:center; gap:clamp(14px,2vw,22px); flex-wrap:wrap;
    margin-bottom:clamp(24px,3.4vw,38px);
  }
  .g-blob {
    width:clamp(52px,6vw,64px); aspect-ratio:1 / 1; flex-shrink:0;
    clip-path:url(#bl-sq1); background:var(--surface-sunken);
    color:var(--brand-700); overflow:hidden;
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-display); font-size:clamp(19px,2.4vw,23px); line-height:1;
  }
  .g-blob img { width:100%; height:100%; object-fit:cover; display:block; }
  @supports not (aspect-ratio: 1 / 1) { .g-blob { height:60px; } }

  .app-mast h1 {
    font-family:var(--font-display); font-weight:500;
    font-size:clamp(24px,3.6vw,38px); line-height:1.4; margin:0;
    letter-spacing:0.035em; overflow-wrap:anywhere; min-width:0; flex:1 1 auto;
  }
  .app-mast .btn { flex-shrink:0; }

  .app-tabs {
    display:flex; gap:8px; overflow-x:auto; min-width:0;
    padding-bottom:4px; margin-bottom:clamp(30px,4vw,46px);
  }
  .app-tabs[hidden] { display:none; }
  @media (max-width:620px) {
    .app-tabs { flex-wrap:wrap; overflow-x:visible; padding-bottom:0; }
  }
  .app-tab {
    display:inline-flex; align-items:center; gap:9px; flex-shrink:0;
    padding:10px 18px; min-height:44px; border-radius:var(--r-pill);
    font-family:inherit; font-size:13px; font-weight:700; line-height:1;
    color:var(--brand-700); text-decoration:none; white-space:nowrap;
    background:var(--surface); border:0; cursor:pointer;
  }
  .app-tab .icon { width:18px; height:18px; flex-shrink:0; }
  .app-tab:hover { background:#FFFFFF; }
  .app-tab[aria-current="page"] { background:var(--brand-700); color:var(--on-brand); }
  .app-tab[aria-current="page"]:hover { background:var(--brand-hover); }

  .app-sec { margin-bottom:clamp(18px,2.4vw,26px); }
  .app-sec:empty { display:none; }
  .app-h {
    font-family:var(--font-display); font-weight:500;
    font-size:clamp(19px,2.4vw,23px); margin:0; line-height:1.5;
  }
  .app-lead { margin:8px 0 0; font-size:13px; color:var(--ink-soft); line-height:2; max-width:46em; }
  .app-count {
    display:inline-block; margin-left:10px; font-size:12px; font-weight:700;
    color:var(--brand-700); background:var(--brand-100); border-radius:var(--r-pill); padding:4px 11px;
  }

  #view, .stack { display:flex; flex-direction:column; gap:clamp(28px,3.6vw,42px); }
  .blk { margin:0; }
  .blk > .h { font-family:var(--font-display); font-weight:500; font-size:18px; margin:0; display:inline; }
  .blk > .note { margin:7px 0 0; font-size:12.5px; color:var(--ink-soft); line-height:1.9; }
  .blk > .body { margin-top:14px; }

  .app-jumps { display:flex; flex-direction:column; gap:8px; }
  .app-jump {
    display:flex; align-items:center; gap:14px; min-height:72px;
    background:var(--surface); border-radius:var(--r-tile);
    padding:12px clamp(14px,2vw,20px); text-decoration:none; color:inherit;
  }
  .app-jump:hover { background:#FFFFFF; }
  .app-jump > .icon { width:18px; height:18px; flex-shrink:0; color:var(--brand-300); }
  .app-jump .ico {
    width:40px; height:40px; flex-shrink:0; clip-path:url(#bl-sq1);
    background:var(--surface-sunken); color:var(--brand-700);
    display:flex; align-items:center; justify-content:center;
  }
  .app-jump .ico .icon { width:20px; height:20px; }
  .app-jump .body { flex:1 1 auto; min-width:0; }
  .app-jump .nm { display:block; font-size:14px; font-weight:700; line-height:1.6; }
  .app-jump .sub { display:block; font-size:11.5px; color:var(--ink-soft); line-height:1.7; }

  .botcard { background:var(--surface); border-radius:var(--r-tile); padding:14px clamp(14px,2vw,20px); }
  .botcard + .botcard { margin-top:8px; }
  .bot-head { display:flex; align-items:center; gap:12px; }
  .bot-head .no { font-family:var(--font-display); font-size:13px; color:var(--brand-300); flex-shrink:0; line-height:1; }
  .bot-head .nm { display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-width:0; flex:1 1 auto; }
  .bot-head .n { font-size:14px; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
  .bot-head .app-toggle { flex-shrink:0; }
  .bot-body { margin-top:12px; }
  .bot-body .app-select { width:100%; }
  .bot-body .app-fill + .app-fill { margin-top:10px; }
  .botcard.is-off .bot-body { opacity:.42; }
  .botcard.is-off .bot-body .app-select { pointer-events:none; }
  .botcard.is-off .bot-head .n { color:var(--ink-soft); }

  .app-fields { display:flex; flex-direction:column; gap:8px; }
  .app-field {
    display:flex; align-items:center; gap:clamp(14px,3vw,28px);
    background:var(--surface); border-radius:var(--r-tile);
    padding:12px clamp(14px,2vw,20px); min-height:68px;
  }
  .app-field .lab { flex:1 1 auto; min-width:0; }
  .app-field .lab .k { display:block; font-size:14px; font-weight:700; line-height:1.6; }
  .app-field .lab .sub { display:block; font-size:11.5px; color:var(--ink-soft); line-height:1.7; }
  .app-field .ctl { flex:0 0 auto; display:flex; align-items:center; gap:10px; }
  @media (max-width:560px) {
    .app-field { flex-wrap:wrap; gap:10px; }
    .app-field .ctl { width:100%; }
    .app-field .ctl .app-select { width:100%; }
    .app-field.is-switch { flex-wrap:nowrap; }
    .app-field.is-switch .ctl { width:auto; }
  }

  .app-text {
    font-family:inherit; font-size:14px; color:var(--ink);
    background:var(--brand-50); border:0; border-radius:var(--r-field);
    padding:11px 16px; min-height:46px;
    transition:box-shadow .12s ease;
  }
  .app-text { flex:1 1 160px; min-width:0; }
  .app-text:focus { outline:0; box-shadow:0 0 0 2px var(--brand-300); }
  .app-text::placeholder { color:var(--brand-300); }
  .app-text::-webkit-search-cancel-button,
  .app-text::-webkit-search-decoration { -webkit-appearance:none; appearance:none; }
  .app-lab { display:block; font-size:10px; font-weight:700; letter-spacing:.14em; color:var(--brand-500); margin-bottom:7px; }
  .app-fill { flex:1 1 200px; min-width:0; }
  .app-fill > .app-text, .app-fill > .app-select { width:100%; }

  .app-select { position:relative; display:inline-block; width:min(340px,100%); min-width:190px; }
  .app-select .face {
    font-family:inherit; font-size:14px; color:var(--ink); text-align:left;
    background:var(--brand-50); border:0; border-radius:var(--r-field); cursor:pointer;
    padding:11px 42px 11px 16px; min-height:46px; width:100%;
    display:flex; align-items:center; transition:box-shadow .12s ease;
  }
  .app-select .val { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .app-select.is-blank .val { color:var(--brand-300); }
  .app-select .mark {
    position:absolute; right:17px; top:50%; width:8px; height:8px;
    border-right:1.8px solid var(--brand-500); border-bottom:1.8px solid var(--brand-500);
    transform:translateY(-70%) rotate(45deg); transition:transform .16s ease; pointer-events:none;
  }
  .app-select[data-open="true"] .mark { transform:translateY(-25%) rotate(225deg); }
  .app-select[data-open="true"] .face { box-shadow:0 0 0 2px var(--brand-300); }
  .app-select .face:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }

  .app-select .menu {
    position:absolute; z-index:30; left:0; top:calc(100% + 8px);
    min-width:100%; width:max-content; max-width:min(340px,86vw);
    max-height:min(340px,68vh); flex-direction:column;
    background:var(--surface); border-radius:var(--r-pop); padding:8px;
    box-shadow:0 0 0 1.5px var(--brand-200);
  }
  .app-select .menu:not([hidden]) { display:flex; }
  .app-select.drop-up .menu { top:auto; bottom:calc(100% + 8px); }
  .app-select .menu:focus { outline:0; }
  .app-select .find { flex:0 0 auto; padding:2px 2px 8px; }
  .app-select .find .app-text { width:100%; font-size:13.5px; }
  .app-select .opts { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
  .app-select .opts:focus { outline:0; }
  .app-select .none { padding:14px 12px; font-size:13px; color:var(--ink-soft); }
  .app-select .grp { font-size:10px; font-weight:700; letter-spacing:.16em; color:var(--brand-500); padding:10px 12px 5px; }
  .app-select .opt {
    padding:11px 12px 11px 32px; font-size:13.5px; line-height:1.6; cursor:pointer;
    position:relative; min-height:44px; display:flex; align-items:baseline; gap:9px;
    border-radius:10px; flex-wrap:wrap;
  }
  .app-select [hidden] { display:none; }
  .app-select .opt .nm { font-weight:700; }
  .app-select .opt .sub { font-size:12px; font-weight:500; color:var(--ink-soft); }
  .app-select .opt.is-active { background:var(--brand-50); }
  .app-select .opt[aria-selected="true"] { font-weight:700; }
  .app-select .opt[aria-selected="true"]::before {
    content:""; position:absolute; left:13px; top:50%; width:5px; height:9px;
    border-right:2px solid var(--brand-700); border-bottom:2px solid var(--brand-700);
    transform:translateY(-65%) rotate(45deg);
  }

  .app-toggle { display:inline-flex; align-items:center; cursor:pointer; min-height:44px; }
  .app-toggle input { position:absolute; opacity:0; width:0; height:0; }
  .app-toggle .track {
    width:52px; height:30px; border-radius:var(--r-pill); background:var(--brand-200);
    position:relative; transition:background .16s ease; display:block;
  }
  .app-toggle .knob {
    position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%;
    background:var(--surface); transition:transform .16s ease; display:block;
  }
  .app-toggle input:checked + .track { background:var(--brand-700); }
  .app-toggle input:checked + .track .knob { transform:translateX(22px); }
  .app-toggle input:focus-visible + .track { outline:3px solid var(--accent); outline-offset:3px; }

  .app-check {
    display:inline-flex; align-items:center; gap:9px; cursor:pointer;
    font-size:12.5px; color:var(--ink-soft); min-height:44px;
  }
  .app-check input { position:absolute; opacity:0; width:0; height:0; }
  .app-check .box {
    width:21px; height:21px; border-radius:var(--r-chip); flex-shrink:0; position:relative;
    background:var(--brand-100); transition:background .12s ease;
  }
  .app-check input:checked + .box { background:var(--brand-700); }
  .app-check input:checked + .box::after {
    content:""; position:absolute; left:7px; top:4px; width:4px; height:8px;
    border-right:1.8px solid var(--on-brand); border-bottom:1.8px solid var(--on-brand);
    transform:rotate(45deg);
  }
  .app-check input:focus-visible + .box { outline:3px solid var(--accent); outline-offset:2px; }

  @media (prefers-reduced-motion:reduce) {
    .app-toggle .track, .app-toggle .knob, .app-select .mark,
    .app-text, .app-select .face, .app-check .box { transition:none; }
  }

  .app-rows { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
  .app-row {
    display:flex; align-items:center; gap:14px; min-height:64px; color:inherit;
    background:var(--surface); border-radius:var(--r-tile);
    padding:10px clamp(12px,1.6vw,18px);
  }
  .app-row .ico {
    width:38px; height:38px; border-radius:50%; overflow:hidden; flex-shrink:0;
    background:var(--brand-200); color:var(--brand-700);
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-display); font-size:15px; line-height:1;
  }
  .app-row .ico img { width:100%; height:100%; object-fit:cover; display:block; }
  .app-row .body { flex:1 1 auto; min-width:0; }
  .app-row .nm { font-size:14px; font-weight:700; line-height:1.6; overflow-wrap:anywhere; }
  .app-row .meta { font-size:11px; color:var(--ink-soft); line-height:1.7; overflow-wrap:anywhere; }
  .app-row .btn { flex-shrink:0; }

  .app-dict .nm { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  .app-dict .word { font-weight:700; overflow-wrap:anywhere; }
  .app-dict .arrow { color:var(--brand-300); font-weight:700; flex-shrink:0; }

  .app-add { display:flex; flex-direction:column; gap:10px; }
  .app-addrow { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
  .app-addrow .app-fill { flex:1 1 200px; max-width:none; min-width:0; }
  .app-addrow .app-check { flex:0 0 auto; margin-bottom:2px; }
  .app-addrow .btn { flex:0 0 auto; margin-bottom:1px; }

  .app-open { background:var(--surface); border-radius:var(--r-tile); }
  .app-open > summary {
    display:flex; align-items:center; gap:12px; cursor:pointer; list-style:none;
    padding:16px clamp(14px,2vw,20px); min-height:60px;
  }
  .app-open > summary::-webkit-details-marker { display:none; }
  .app-open > summary .nm { font-family:var(--font-display); font-weight:500; font-size:17px; flex:1 1 auto; }
  .app-open > summary .icon {
    width:18px; height:18px; flex-shrink:0; color:var(--brand-300);
    transition:transform .16s ease;
  }
  .app-open[open] > summary .icon { transform:rotate(90deg); }
  .app-open > summary:focus-visible { outline:3px solid var(--accent); outline-offset:-3px; border-radius:var(--r-tile); }
  .app-open > .body { padding:0 clamp(14px,2vw,20px) 16px; }
  .app-open .app-row { background:var(--brand-50); }
  .app-open .app-empty { padding:20px 0 16px; }
  @media (prefers-reduced-motion:reduce) { .app-open > summary .icon { transition:none; } }

  .app-picked { margin-top:12px; }
  .app-picked .app-row { background:var(--brand-50); }

  .app-del {
    width:44px; height:44px; flex-shrink:0; border:0; padding:0; cursor:pointer;
    background:transparent; color:var(--accent); border-radius:50%;
    display:flex; align-items:center; justify-content:center;
  }
  .app-del .icon { width:19px; height:19px; }
  .app-del:hover { background:var(--brand-50); }
  .app-del:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }

  .app-search { padding:4px 0 0; }
  .app-find { position:relative; flex:1 1 240px; min-width:0; }
  .app-find .app-text { width:100%; flex:none; }
  .app-results {
    position:absolute; z-index:30; left:0; right:0; top:calc(100% + 8px);
    max-height:320px; overflow-y:auto; overscroll-behavior:contain;
    background:var(--surface); border-radius:var(--r-pop); padding:8px;
    box-shadow:0 0 0 1.5px var(--brand-200);
    display:flex; flex-direction:column; gap:2px;
  }
  .app-results[hidden] { display:none; }
  .app-none { margin:0; padding:12px; font-size:12.5px; color:var(--ink-soft); }
  .app-hit {
    display:flex; align-items:center; gap:13px; min-height:56px; width:100%;
    background:transparent; border:0; cursor:pointer; text-align:left;
    font-family:inherit; color:inherit; border-radius:10px; padding:8px 12px;
  }
  .app-hit:hover, .app-hit:focus-visible { background:var(--brand-50); }
  .app-hit .ico {
    width:34px; height:34px; border-radius:50%; overflow:hidden; flex-shrink:0;
    background:var(--brand-200); color:var(--brand-700);
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-display); font-size:14px; line-height:1;
  }
  .app-hit .ico img { width:100%; height:100%; object-fit:cover; display:block; }
  .app-hit .body { flex:1 1 auto; min-width:0; }
  .app-hit .nm { font-size:13.5px; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
  .app-hit .meta { font-size:11px; color:var(--ink-soft); overflow-wrap:anywhere; }

  .gdlg {
    border:0; padding:0; max-width:min(440px,calc(100vw - 32px)); width:100%;
    background:var(--surface); color:var(--ink); border-radius:var(--r-dlg);
    font-family:inherit;
  }
  .gdlg::backdrop { background:rgba(74,46,30,.45); }
  .gdlg:focus { outline:0; }
  .gdlg-head { display:flex; align-items:center; gap:14px; padding:20px 20px 14px; }
  .gdlg-head h2 { font-family:var(--font-display); font-weight:500; font-size:18px; margin:0; flex:1 1 auto; }
  .gdlg-x {
    width:36px; height:36px; flex-shrink:0; border:0; cursor:pointer; padding:0;
    background:transparent; color:var(--brand-500); border-radius:50%;
    display:flex; align-items:center; justify-content:center;
  }
  .gdlg-x:hover { background:var(--brand-50); color:var(--brand-700); }
  .gdlg-x .icon { width:18px; height:18px; }
  .gdlg-list { padding:0 12px 16px; max-height:min(60vh,420px); overflow-y:auto; display:flex; flex-direction:column; gap:2px; }
  .gdlg-row {
    display:flex; align-items:center; gap:12px; width:100%; text-align:left;
    padding:9px 12px; min-height:52px; border-radius:var(--r-pop);
    border:0; background:transparent; cursor:pointer; font-family:inherit; color:inherit;
    font-size:13.5px; font-weight:700;
  }
  .gdlg-row:hover { background:var(--brand-50); }
  .gdlg-row.is-on { background:var(--brand-700); color:var(--on-brand); }
  .gdlg-row.is-locked { color:var(--brand-300); cursor:default; }
  .gdlg-row .t { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
  .gdlg-row .g-ico {
    width:30px; height:30px; border-radius:50%; overflow:hidden; flex-shrink:0;
    background:var(--brand-200); color:var(--brand-700);
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-display); font-size:13px; line-height:1;
  }
  .gdlg-row .g-ico img { width:100%; height:100%; object-fit:cover; display:block; }

  .gdlg-ask { max-width:min(400px,calc(100vw - 32px)); }
  .gdlg-body { margin:0; padding:0 20px; font-size:13px; color:var(--ink-soft); line-height:2; }
  .gdlg-act { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; padding:20px; }

  .app-skel {
    display:flex; align-items:center; gap:14px; min-height:64px;
    background:var(--surface); border-radius:var(--r-tile);
    padding:10px clamp(12px,1.6vw,18px);
  }
  .app-skel span { background:var(--brand-100); display:block; height:13px; border-radius:var(--r-pill); }
  .app-skel .s-ico { width:38px; height:38px; border-radius:50%; flex-shrink:0; }
  .app-skel .s-nm { width:min(52%,240px); }
  @media (prefers-reduced-motion:no-preference) {
    .app-skel span { animation:appBreathe 1.6s ease-in-out infinite; }
    .app-skel:nth-child(2) span { animation-delay:.15s; }
    .app-skel:nth-child(3) span { animation-delay:.3s; }
  }
  @keyframes appBreathe { 0%,100% { opacity:1; } 50% { opacity:.5; } }

  .app-empty { text-align:center; padding:40px 0 36px; color:var(--ink-soft); }
  .app-empty .mark {
    width:74px; aspect-ratio:1 / 1; margin:0 auto 14px;
    clip-path:url(#bl-sq1); background:var(--surface-sunken);
    color:var(--brand-300); display:flex; align-items:center; justify-content:center;
  }
  .app-empty .mark .icon { width:28px; height:28px; }
  @supports not (aspect-ratio: 1 / 1) { .app-empty .mark { height:74px; } }
  .app-empty p { margin:0; font-size:13px; line-height:1.9; }

  .app-state { margin:16px 0 4px; font-size:13px; color:var(--ink-soft); line-height:1.95; }
  .app-state.err { color:var(--accent); }
  .app-state-act { display:flex; gap:12px; flex-wrap:wrap; margin:0 0 4px; }
  .app-note { margin:14px 0 0; font-size:12px; color:var(--ink-soft); line-height:1.95; }
  .app-note a { color:var(--brand-700); }
  .app-load { margin:22px 0; font-size:13px; color:var(--ink-soft); }

  .app-save {
    position:fixed; right:22px; bottom:22px;
    z-index:40; padding:11px 22px; border-radius:var(--r-pill);
    background:var(--brand-700); color:var(--on-brand);
    font-size:12.5px; font-weight:700; letter-spacing:.04em;
    max-width:calc(100vw - 44px);
  }
  .app-save.err { background:var(--accent); }
  @media (max-width:520px) { .app-save { right:16px; left:16px; bottom:16px; text-align:center; } }

  html.dash-in #dash-signin { display:none; }
  html.dash-in #dash-app { display:block; }
