:root{--bg:#090a0c;--panel:#111318;--line:#272a30;--gold:#d3a64d;--text:#f3f0e9;--muted:#9298a2;--teal:#55d6be}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(circle at 20% 0,#19150d 0,transparent 30%),var(--bg);color:var(--text);font-family:Inter,sans-serif}
.forum-header{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,4vw,64px);border-bottom:1px solid var(--line);background:rgba(9,10,12,.9);position:sticky;top:0;z-index:20;backdrop-filter:blur(15px)}
.forum-brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}
.forum-mark{display:grid;place-items:center;width:38px;height:38px;border:1px solid #795f2d;border-radius:11px;color:#e7bd68;font-size:24px}
.forum-brand strong,.forum-brand small{display:block}
.forum-brand strong{font:600 18px 'Cormorant Garamond',serif}
.forum-brand small{color:#888;font-size:9px;letter-spacing:.14em;text-transform:uppercase}
.forum-header nav{display:flex;align-items:center;gap:10px}
.forum-header nav>a,.forum-header nav>button{border:1px solid var(--line);border-radius:9px;padding:10px 13px;color:#d7d9dd;background:#13151a;text-decoration:none;font:700 11px Inter;cursor:pointer}
.forum-header #newPostButton{background:var(--gold);color:#100d07;border-color:var(--gold)}
.forum-shell{width:min(1180px,calc(100% - 36px));margin:auto}
.forum-hero{padding:74px 0 52px;border-bottom:1px solid var(--line)}
.forum-hero p,.forum-kicker,.forum-guide>span{color:var(--gold);font-size:10px;font-weight:700;letter-spacing:.16em}
.forum-hero h1{max-width:780px;margin:9px 0 12px;font:600 clamp(38px,6vw,70px)/.95 'Cormorant Garamond',serif}
.forum-hero>span{display:block;max-width:650px;color:var(--muted);font-size:13px;line-height:1.7}
.forum-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 0}
.forum-categories{display:flex;gap:7px;flex-wrap:wrap}
.forum-categories button{border:1px solid var(--line);border-radius:999px;padding:8px 12px;background:#111318;color:#9da2aa;cursor:pointer;font-size:10px;font-weight:700}
.forum-categories button.is-active{background:#d3a64d;color:#111;border-color:#d3a64d}
.forum-toolbar>span{color:#737983;font-size:10px}
.forum-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:28px;padding-bottom:70px}
.forum-feed{display:grid;gap:12px}
.forum-post{padding:22px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,#13161b,#0e1014);cursor:pointer;transition:.2s}
.forum-post:hover{transform:translateY(-2px);border-color:#5c4a28}
.forum-post-meta{display:flex;justify-content:space-between;gap:12px;color:#777e88;font-size:10px}
.forum-category{color:#e0b65f;text-transform:uppercase;letter-spacing:.1em;font-weight:700}
.forum-post h2{margin:11px 0 8px;font:600 27px 'Cormorant Garamond',serif}
.forum-post-body{color:#a6abb3;font-size:12px;line-height:1.65;white-space:pre-wrap}
.pattern-attachment{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:16px;padding:13px;border:1px solid rgba(85,214,190,.25);border-radius:11px;background:rgba(85,214,190,.05)}
.pattern-attachment strong,.pattern-attachment small{display:block}
.pattern-attachment small{margin-top:4px;color:#7d8f8b;font-size:9px}
.pattern-attachment a{white-space:nowrap;border-radius:8px;padding:9px 11px;background:#55d6be;color:#07110f;text-decoration:none;font-size:10px;font-weight:800}

/* v1.3.1 · Interactive forum pattern player */
.pattern-attachment{display:grid;grid-template-columns:minmax(190px,42%) minmax(0,1fr);align-items:center;gap:16px;border-radius:13px;background:linear-gradient(135deg,rgba(85,214,190,.075),rgba(85,214,190,.025));overflow:hidden}
.pattern-preview{display:block;width:100%;height:132px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:radial-gradient(circle at 50% 50%,rgba(85,214,190,.09),rgba(4,8,10,.85) 68%)}
.pattern-attachment-info{min-width:0}
.pattern-attachment strong{font:600 19px 'Cormorant Garamond',serif}
.pattern-attachment small{margin-top:5px;line-height:1.5}
.pattern-attachment-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}
.pattern-attachment .pattern-attachment-actions a,.pattern-attachment .pattern-attachment-actions button{min-height:35px;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;border:1px solid rgba(85,214,190,.38);border-radius:8px;padding:8px 11px;background:#55d6be;color:#07110f;text-decoration:none;font:800 10px Inter;cursor:pointer}
.pattern-attachment .pattern-attachment-actions button{background:rgba(8,27,24,.92);color:#cffff5}
.pattern-attachment .pattern-attachment-actions button:hover,.pattern-attachment .pattern-attachment-actions a:hover{filter:brightness(1.1)}
.pattern-attachment .pattern-attachment-actions button.is-playing{border-color:#f1c15e;color:#ffe2a4;background:#2b2110}
.forum-guide{height:max-content;padding:22px;border:1px solid var(--line);border-radius:16px;background:#111318;position:sticky;top:96px}
.forum-guide h2{font:600 26px 'Cormorant Garamond',serif}
.forum-guide p{color:#9298a2;font-size:11px;line-height:1.7}
.forum-guide a{color:#e0b65f;text-decoration:none;font-size:11px;font-weight:700}
.forum-empty{padding:50px;border:1px dashed #343840;border-radius:16px;text-align:center;color:#818792}
.forum-modal[hidden]{display:none}
.forum-modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px}
.forum-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.78);backdrop-filter:blur(8px)}
.forum-dialog{position:relative;width:min(600px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:28px;border:1px solid #403620;border-radius:18px;background:#111318;box-shadow:0 30px 100px #000}
.forum-dialog--detail{width:min(760px,100%)}
.forum-dialog h2{margin:6px 0 18px;font:600 34px 'Cormorant Garamond',serif}
.forum-dialog label{display:grid;gap:7px;margin:13px 0;color:#b1b5bc;font-size:11px}
.forum-dialog input,.forum-dialog select,.forum-dialog textarea{width:100%;border:1px solid #32363d;border-radius:9px;padding:12px;background:#090b0e;color:#fff;font:12px Inter;resize:vertical}
.forum-close{position:absolute;right:14px;top:12px;border:0;background:transparent;color:#999;font-size:26px;cursor:pointer}
.forum-primary{border:0;border-radius:9px;padding:12px 15px;background:var(--gold);color:#100d07;font-weight:800;cursor:pointer}
.forum-feedback{min-height:18px;color:#ff9999;font-size:11px}
.comments-list{display:grid;gap:10px;margin:25px 0}
.forum-comment{padding:14px;border:1px solid var(--line);border-radius:10px;background:#0c0e11}
.forum-comment header{display:flex;justify-content:space-between;color:#818791;font-size:9px}
.forum-comment p{white-space:pre-wrap;color:#c5c8cd;font-size:11px;line-height:1.6}
.comment-form{border-top:1px solid var(--line);padding-top:18px}
.detail-author{color:#858b94;font-size:10px}
.detail-body{white-space:pre-wrap;color:#bec2c9;font-size:13px;line-height:1.75}
.delete-link{border:0;background:transparent;color:#e58c8c;cursor:pointer;font-size:9px}

/* v1.3.3 · Screen, microphone and optional webcam recording */
.recording-panel{margin:16px 0;padding:15px;border:1px solid rgba(85,214,190,.24);border-radius:12px;background:rgba(85,214,190,.045)}
.recording-guide{display:flex;flex-direction:column;gap:4px;margin:12px 0;padding:11px 12px;border-left:3px solid #55d6be;background:rgba(85,214,190,.075);color:#f2fbf9}.recording-guide small{color:#aebbb9;line-height:1.45}.recording-actions button:disabled{opacity:.42;cursor:not-allowed;filter:saturate(.35)}
.recording-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.recording-heading b,.recording-heading small{display:block}.recording-heading b{font-size:12px;color:#e8fff9}.recording-heading small{margin-top:4px;color:#82948f;font-size:9px;line-height:1.5}
.camera-option{display:flex!important;grid-auto-flow:column;align-items:center;gap:7px!important;margin:0!important;white-space:nowrap}.camera-option input{width:auto!important;margin:0}
.recording-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:13px}
.recording-actions button{min-height:34px;border:1px solid #32443f;border-radius:8px;padding:8px 11px;background:#13201d;color:#cffff5;font:700 10px Inter;cursor:pointer}.recording-actions button:first-child span{color:#ff6060}.recording-actions button[hidden]{display:none}.recording-actions time{margin-left:auto;color:#e4bd6e;font:700 10px Inter}
.recording-status{margin:10px 0 0;color:#81908d;font-size:9px;line-height:1.55}
#recordingPreview{display:block;width:100%;max-height:310px;margin-top:12px;border:1px solid #30363a;border-radius:9px;background:#050607}#recordingPreview[hidden]{display:none}
.forum-video{margin-top:16px;padding:10px;border:1px solid rgba(211,166,77,.25);border-radius:12px;background:#090b0e}.forum-video video{display:block;width:100%;max-height:480px;border-radius:8px;background:#000}.forum-video small{display:block;margin:8px 3px 1px;color:#8f949c;font-size:9px}
@media(max-width:800px){.forum-layout{grid-template-columns:1fr}
.forum-guide{display:none}
.forum-header{padding:0 14px}
.forum-brand strong{font-size:15px}
.forum-header nav>a{display:none}
.forum-header nav>button{padding:9px}
.forum-shell{width:min(100% - 24px,1180px)}
.forum-hero{padding:46px 0 34px}
.forum-toolbar{align-items:flex-start;flex-direction:column}
.pattern-attachment{align-items:flex-start;flex-direction:column}
}
@media(max-width:800px){.pattern-attachment{display:grid;grid-template-columns:1fr}.pattern-preview{height:150px}.pattern-attachment-actions{align-items:stretch;flex-direction:column}.pattern-attachment .pattern-attachment-actions a,.pattern-attachment .pattern-attachment-actions button{width:100%}}
@media(max-width:600px){.recording-heading{align-items:flex-start;flex-direction:column}.recording-actions time{width:100%;margin:2px 0 0}.forum-dialog{padding:22px 17px}}

/* v1.3.7 · Shared appearance */
.forum-theme-button{display:inline-flex!important;align-items:center;gap:6px}.forum-theme-button span{color:#e3b95f}.forum-theme-button b{font:inherit}
.forum-language-button span{display:inline-grid;place-items:center;min-width:20px;height:18px;border-radius:5px;background:rgba(211,166,77,.12);font-size:8px}.forum-language-button b{font-size:9px}
:root[data-theme="light"]{--bg:#f4f5f7;--panel:#fff;--line:#d8dce2;--text:#1b2027;--muted:#68717d}
:root[data-theme="light"] body{background:radial-gradient(circle at 20% 0,#fff3d8 0,transparent 30%),var(--bg)}:root[data-theme="light"] .forum-header{background:rgba(255,255,255,.92)}:root[data-theme="light"] .forum-header nav>a,:root[data-theme="light"] .forum-header nav>button{background:#fff;color:#303741}:root[data-theme="light"] .forum-post{background:linear-gradient(145deg,#fff,#f6f7f9)}:root[data-theme="light"] .forum-post-body,:root[data-theme="light"] .detail-body,:root[data-theme="light"] .forum-comment p{color:#525b67}:root[data-theme="light"] .forum-categories button,:root[data-theme="light"] .forum-guide{background:#fff}:root[data-theme="light"] .forum-dialog{background:#fff;color:#1b2027;box-shadow:0 30px 100px rgba(31,39,51,.24)}:root[data-theme="light"] .forum-dialog input,:root[data-theme="light"] .forum-dialog select,:root[data-theme="light"] .forum-dialog textarea{background:#f5f6f8;color:#1b2027;border-color:#ccd1d8}:root[data-theme="light"] .forum-comment,:root[data-theme="light"] .forum-video{background:#f4f5f7}:root[data-theme="light"] .recording-guide{color:#25332f}:root[data-theme="light"] .recording-heading b{color:#20312d}:root[data-theme="light"] .recording-actions button{background:#e7f4f0;color:#18352f}
@media(max-width:800px){.forum-theme-button b{display:none}}

/* v1.3.11 · Mobile forum experience */
@media(max-width:800px){
  body{overflow-x:hidden;padding-bottom:env(safe-area-inset-bottom)}
  .forum-header{height:auto;min-height:108px;align-items:stretch;flex-direction:column;gap:7px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px}
  .forum-brand{min-height:38px}.forum-mark{width:34px;height:34px}.forum-brand strong{font-size:16px}.forum-brand small{font-size:8px}
  .forum-header nav{width:100%;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .forum-header nav::-webkit-scrollbar{display:none}
  .forum-header nav>a,.forum-header nav>button{display:inline-flex!important;flex:0 0 auto;align-items:center;justify-content:center;min-width:44px;min-height:42px;padding:8px 11px;white-space:nowrap}
  .forum-theme-button b,.account-label{display:none!important}
  .forum-shell{width:calc(100% - 22px)}
  .forum-hero{padding:34px 2px 28px}.forum-hero h1{font-size:clamp(37px,12vw,54px)}.forum-hero>span{font-size:12px}
  .forum-toolbar{gap:12px;padding:17px 0}.forum-categories{width:100%;flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px;scrollbar-width:none;scroll-snap-type:x proximity}.forum-categories::-webkit-scrollbar{display:none}.forum-categories button{flex:0 0 auto;min-height:40px;scroll-snap-align:start}
  .forum-post{padding:17px;border-radius:14px}.forum-post h2{font-size:25px}.forum-post-meta{align-items:flex-start;flex-direction:column;gap:5px}
  .pattern-preview{height:180px}.pattern-attachment{padding:10px}.pattern-attachment .pattern-attachment-actions a,.pattern-attachment .pattern-attachment-actions button{min-height:44px;font-size:11px}
  .forum-modal{align-items:end;padding:0}.forum-dialog{width:100%;max-height:94dvh;border-radius:20px 20px 0 0;padding:24px 17px calc(18px + env(safe-area-inset-bottom))}.forum-dialog h2{font-size:30px}.forum-close{width:44px;height:44px;right:5px;top:5px}
  .forum-dialog input,.forum-dialog select,.forum-dialog textarea{min-height:46px;font-size:16px}.forum-primary{min-height:46px;width:100%}
  .recording-panel{padding:12px}.recording-heading{align-items:flex-start;flex-direction:column}.camera-option{min-height:40px}.camera-option input{width:22px!important;height:22px}
  .recording-actions{display:grid;grid-template-columns:1fr 1fr}.recording-actions button{min-height:44px}.recording-actions time{grid-column:1/-1;width:100%;margin:3px 0 0;text-align:center}
  #recordingPreview{max-height:42dvh}.comments-list{margin:18px 0}.forum-comment{padding:12px}.comment-form textarea{font-size:16px}
}
@media(max-width:420px){
  .forum-header{min-height:102px}.forum-brand strong{font-size:15px}
  .forum-header nav>a,.forum-header nav>button{padding:8px 10px}
  .pattern-preview{height:155px}.recording-actions{grid-template-columns:1fr}.recording-actions time{grid-column:auto}
}
@media(max-height:520px) and (orientation:landscape){
  .forum-header{min-height:58px;align-items:center;flex-direction:row;padding:5px 9px}.forum-brand span:last-child{display:none}.forum-header nav{justify-content:flex-end}
  .forum-dialog{max-height:100dvh;border-radius:0}
}
