:root{--wine:#7A1734;--wine-dark:#5E1028;--purple-blue:#26233F;--purple-blue-dark:#1C1930;--ink:#2B2730;--muted:#756E73;--line:#E6DED8;--soft:#F7F2ED;--coffee:#F4EEE8;--yellow:#FFF8C7;--danger:#A61B2B;--ok:#2E6B57}*{box-sizing:border-box}html{background:var(--coffee);-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#fff}.bimat-shell{max-width:560px;margin:0 auto;min-height:100vh;background:#fff}.bimat-main{padding-bottom:40px}.bimat-header{height:58px;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:8px;padding:0 10px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:20}.bimat-logo{font-weight:900;text-decoration:none;color:var(--purple-blue);text-align:center;font-size:18px}.bimat-header-actions{display:flex;align-items:center;gap:3px}.bimat-icon-btn,.bimat-header-submit{border:0;background:transparent;font-size:22px;min-width:40px;height:40px;cursor:pointer}.bimat-header-submit{font-size:30px;line-height:1;color:var(--wine)}.bimat-banner{overflow:hidden}.bimat-banner-stage{position:relative;aspect-ratio:1536/915}.bimat-banner-base{width:100%;height:100%;object-fit:contain;display:block}.bimat-banner-screen{position:absolute;left:60.92%;top:4.95%;width:33.10%;height:87.25%;overflow:hidden;border-radius:10.8% 10.8% 0 0 / 6.4% 6.4% 0 0;background:#111}.bimat-banner-screen img{width:100%;height:100%;object-fit:cover;object-position:50% 28%;transform:scale(1.025)}.bimat-banner-screen span{position:absolute;top:1.55%;left:50%;width:22.5%;height:4.45%;transform:translateX(-50%);border-radius:999px;background:#07080a}.bimat-category-cloud{padding:17px 18px 14px;border-bottom:1px solid var(--line)}.bimat-category-cloud h2{font-size:18px;margin:0 0 10px;color:var(--purple-blue)}.bimat-category-cloud-links{line-height:1.8;text-align:left}.bimat-cloud-link{color:var(--wine);text-decoration:none}.bimat-cloud-link.level-1{font-size:14px}.bimat-cloud-link.level-2{font-size:16px;font-weight:650}.bimat-cloud-link.level-3{font-size:18px;font-weight:800}.bimat-cloud-dot{color:#a7adb6;margin:0 4px}.bimat-feed{display:grid}.bimat-feed-row{display:grid;grid-template-columns:64px 1fr 22px;gap:12px;align-items:center;padding:12px 14px;text-decoration:none;color:inherit;border-bottom:1px solid var(--line);min-height:84px}.bimat-feed-thumb{width:64px;height:64px;border-radius:12px;overflow:hidden;background:#eee}.bimat-feed-thumb img{width:100%;height:100%;object-fit:cover}.bimat-feed-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.bimat-feed-copy small{font-size:12.5px;color:var(--muted);line-height:1.3}.bimat-feed-copy strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bimat-feed-chevron{font-size:26px;color:#a8aeb8}.bimat-empty{padding:26px 18px;color:var(--muted);text-align:center}.bimat-sheet-overlay{position:fixed;inset:0;background:rgba(10,15,25,.42);z-index:80}.bimat-sheet{position:fixed;z-index:81;left:50%;bottom:0;transform:translateX(-50%);width:min(560px,100%);max-height:92vh;max-height:92dvh;background:#fff;border-radius:22px 22px 0 0;box-shadow:0 -10px 35px rgba(0,0,0,.18);overflow:hidden}.bimat-sheet>header{height:54px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line)}.bimat-sheet>header button{border:0;background:transparent;font-size:28px;cursor:pointer}.bimat-sheet-body{padding:16px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(92vh - 54px);max-height:calc(92dvh - 54px);padding-bottom:max(16px,env(safe-area-inset-bottom))}.bimat-grid{display:grid;gap:14px}.bimat-field{display:grid;gap:7px;font-weight:700;font-size:14px}.bimat-input,.bimat-select,.bimat-textarea{width:100%;border:1px solid #d8dce5;border-radius:12px;padding:12px 13px;font-family:inherit;font-size:16px;line-height:1.35;background:#fff;color:var(--ink);-webkit-appearance:none;appearance:none}.bimat-textarea{min-height:170px;resize:vertical;line-height:1.55}.bimat-btn{appearance:none;border:0;border-radius:12px;padding:12px 16px;font-weight:800;background:var(--wine);color:#fff;cursor:pointer}.bimat-btn.secondary{background:var(--coffee);color:var(--purple-blue)}.bimat-btn.danger{background:#feeceb;color:var(--danger)}.bimat-btn:disabled{opacity:.45;cursor:not-allowed}.bimat-message{font-size:14px;color:var(--muted)}.bimat-error{color:var(--danger)}.bimat-ok{color:var(--ok)}.bimat-create-progress{font-size:13px;color:var(--muted);margin-bottom:10px}.bimat-writer-head h3{margin:0 0 8px;font-size:20px}.bimat-writer-head p{margin:0 0 14px;color:var(--muted);line-height:1.5}.bimat-char-row{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:var(--muted);margin-top:6px}.bimat-char-row.is-ready{color:var(--ok);font-weight:700}.bimat-written-list{display:grid;gap:8px;margin-top:12px}.bimat-written-item{border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--soft)}.bimat-written-item button{border:0;background:transparent;color:var(--wine);font-weight:700;padding:0;cursor:pointer}.bimat-story-hero{padding:16px}.bimat-story-hero img{width:100%;max-height:520px;object-fit:cover;border-radius:18px}.bimat-story-meta{margin-top:14px;color:var(--muted);font-size:13px}.bimat-story-hero h1{font-size:28px;line-height:1.12;margin:6px 0 0}.bimat-story-body{padding:0 18px 34px}.bimat-story-part{margin:0 0 24px}.bimat-story-part h2{font-size:17px;margin:0 0 8px}.bimat-story-text{font-size:17px;line-height:1.75;white-space:pre-wrap;cursor:text}.bimat-inline-opinion{background:var(--yellow);border-radius:4px;padding:1px 3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}.bimat-inline-hint{position:fixed;z-index:70;background:var(--purple-blue-dark);color:#fff;padding:8px 10px;border-radius:9px;font-size:13px;box-shadow:0 6px 22px rgba(0,0,0,.22)}.bimat-inline-editor{display:grid;gap:9px}.bimat-seo-intro{padding:16px 18px;border-bottom:1px solid var(--line)}.bimat-seo-intro h1{font-size:24px;margin:0 0 7px}.bimat-seo-intro p{color:var(--muted);line-height:1.55;margin:0}.bimat-admin{max-width:1100px;margin:0 auto;padding:20px}.bimat-admin nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.bimat-admin nav a{padding:8px 10px;border-radius:8px;background:var(--coffee);color:var(--purple-blue);text-decoration:none}.bimat-table{width:100%;border-collapse:collapse}.bimat-table th,.bimat-table td{border-bottom:1px solid var(--line);padding:9px;text-align:left;vertical-align:top}.bimat-admin-card{border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:14px}.bimat-admin-actions{display:flex;gap:8px;flex-wrap:wrap}.bimat-login-wrap{max-width:420px;margin:60px auto;padding:20px}@media(max-width:420px){.bimat-story-hero h1{font-size:25px}.bimat-story-text{font-size:16px}}

/* BiMatCuaTui theme: white + cafe base, wine + dark purple-blue accents */
.bimat-header{box-shadow:0 1px 0 rgba(94,16,40,.02)}
.bimat-logo{letter-spacing:-.01em}
.bimat-logo:hover,.bimat-logo:focus-visible{color:var(--wine)}
.bimat-category-cloud{background:var(--coffee)}
.bimat-cloud-link:hover,.bimat-cloud-link:focus-visible{color:var(--wine-dark);text-decoration:underline;text-underline-offset:3px}
.bimat-feed-row:hover,.bimat-feed-row:focus-visible{background:var(--soft)}
.bimat-feed-copy strong,.bimat-story-hero h1,.bimat-story-part h2,.bimat-seo-intro h1,.bimat-writer-head h3{color:var(--purple-blue)}
.bimat-btn:hover,.bimat-btn:focus-visible{background:var(--wine-dark)}
.bimat-btn.secondary:hover,.bimat-btn.secondary:focus-visible{background:#EEE5DE;color:var(--wine-dark)}
.bimat-input:focus,.bimat-select:focus,.bimat-textarea:focus{outline:2px solid rgba(122,23,52,.14);border-color:var(--wine)}
.bimat-sheet>header{background:#fff}
.bimat-story-meta,.bimat-create-progress{color:var(--muted)}
.bimat-inline-opinion{background:var(--yellow)}
.bimat-admin nav a:hover,.bimat-admin nav a:focus-visible{background:#EEE5DE;color:var(--wine-dark)}

/* iOS form stability: 16px controls prevent Safari focus-zoom; dvh keeps the sheet usable above the keyboard. */
@supports (-webkit-touch-callout:none){.bimat-input,.bimat-select,.bimat-textarea{font-size:16px}.bimat-sheet-body{overscroll-behavior:contain}}

/* Category chooser: use the shared sheet visual language instead of the browser's native <select>. */
.bimat-picker-trigger{width:100%;min-height:52px;border:1px solid #d8dce5;border-radius:12px;padding:12px 14px;background:#fff;color:var(--ink);font:inherit;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;cursor:pointer}
.bimat-picker-trigger:focus-visible{outline:2px solid var(--wine);outline-offset:2px}
.bimat-picker-trigger svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;color:var(--muted)}
.bimat-nested-sheet-layer{position:fixed;inset:0;z-index:90}
.bimat-nested-sheet-overlay{position:absolute;inset:0;background:rgba(10,15,25,.36)}
.bimat-nested-sheet{z-index:91;max-height:min(78dvh,720px);transform:translate(-50%,100%);transition:transform .2s ease}
.bimat-nested-sheet.is-open{transform:translate(-50%,0)}
.bimat-nested-sheet>header button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.bimat-category-sheet-body{padding:0;max-height:calc(min(78dvh,720px) - 54px);-webkit-overflow-scrolling:touch}
.bimat-picker-options{display:grid}
.bimat-picker-option{appearance:none;width:100%;border:0;border-bottom:1px solid var(--line);background:#fff;color:var(--ink);min-height:58px;padding:14px 18px;font:inherit;font-size:16px;font-weight:700;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
.bimat-picker-option:last-child{border-bottom:0}
.bimat-picker-option:active,.bimat-picker-option.is-selected{background:var(--coffee)}
.bimat-picker-option svg{width:20px;height:20px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
