*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;overflow-x:hidden}.board-screen{width:100vw;height:100vh;height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#fdfcf9;display:flex;flex-direction:column;font-family:-apple-system,system-ui,Segoe UI,sans-serif;overflow:hidden}.no-callout{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:manipulation}.message-bar{flex:0 0 auto;display:flex;flex-direction:column;gap:8px;padding:10px 16px;background:#fff;border-bottom:3px solid #ddd}.message-text{font-size:clamp(18px,3.2vw,28px);font-weight:700;color:#1a1a1a;min-height:1.4em;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.message-tile{background:#eef2f5;border:2px solid #c8d2d8;border-radius:10px;padding:2px 12px}.message-empty{color:#999;font-weight:400;font-size:clamp(18px,2.6vw,20px)}.message-actions{display:flex;gap:10px}.msg-btn{flex:1 1 0;min-width:0;border:none;border-radius:14px;font-size:clamp(18px,2.4vw,20px);font-weight:700;padding:10px 12px;min-height:56px;cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;gap:8px;white-space:normal;text-align:center}.msg-btn-label{overflow-wrap:break-word}.msg-btn.undo{background:#514f49}.msg-btn.undo:disabled{background:#d8d5cb;cursor:default}.msg-btn.speak{background:#1d6e4d}.msg-btn.speak:disabled{background:#a9c2b5;cursor:default}@media (min-width: 600px){.message-bar{flex-direction:row;align-items:center}.message-actions{order:-1;flex:0 0 auto}.message-text{flex:1}.msg-btn{flex:0 0 auto;min-width:160px}}[data-layout=stacked] .message-bar{gap:4px;padding:6px 12px}[data-layout=stacked] .message-text{min-height:1.2em}[data-layout=stacked] .msg-btn{min-height:44px;padding:6px 12px}@media (max-height: 420px){.message-bar{padding:2px 16px}.msg-btn{min-height:44px;padding:6px 12px}.utility-bar{padding:4px 16px}.search-btn{min-height:44px}}.body-row{flex:1;min-height:0;display:flex;overflow:hidden}.sidebar{flex:0 0 196px;display:flex;flex-direction:column;gap:8px;padding:14px 10px;background:#f3f1ea;border-right:2px solid #e2e0d8;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#b5b0a3 transparent}.sidebar::-webkit-scrollbar{width:6px}.sidebar::-webkit-scrollbar-thumb{background:#b5b0a3;border-radius:3px}.sidebar .categories{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0}.sidebar-sep{height:2px;background:#d8d5cb;margin:2px 0;flex:0 0 auto}.body-col{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.stacked-nav{flex:0 1 auto;min-height:0;display:flex;flex-direction:column;gap:4px;padding:6px 10px;background:#f3f1ea;border-bottom:2px solid #e2e0d8}.categories-wrap{display:flex;flex-wrap:wrap;gap:4px;overflow-y:auto;min-height:0}.categories-wrap .cat-btn{flex:1 1 140px;min-width:120px;flex-shrink:0;min-height:44px;padding:6px 12px}.pinned-group{display:flex;gap:8px;flex:0 0 auto}.pinned-btn{min-width:64px;border-radius:12px;border:none;font-size:clamp(18px,3vw,24px);font-weight:700;color:#fff;cursor:pointer}[data-layout=sidebar] .pinned-btn{flex:1;min-height:92px}[data-layout=stacked] .pinned-btn{flex:0 1 150px;min-height:48px}.cat-btn{min-height:56px;border-radius:12px;border:3px solid transparent;background:#fff;display:flex;align-items:center;gap:10px;font-size:clamp(18px,2.4vw,20px);font-weight:700;cursor:pointer;padding:8px 14px;text-align:left;color:#1a1a1a}[data-layout=sidebar] .cat-btn{flex:0 1 56px;min-height:44px}.cat-btn .dot{width:18px;height:18px;border-radius:50%;flex:0 0 auto}.cat-btn.active{border-color:#1a1a1a;background:#fff8ec}.grid-area{flex:1 1 150px;min-width:0;min-height:150px;padding:12px 16px;display:flex;flex-direction:column;gap:10px;overflow:hidden}[data-layout=stacked] .grid-area{padding:6px 10px}[data-layout=stacked] .grid{gap:8px}.grid-fit-warning{flex:0 0 auto;margin:0;padding:6px 12px;background:#fdecea;border:2px solid #e0a39c;border-radius:10px;color:#8a2e22;font-size:14px;font-weight:700}.grid-measure{flex:1;min-width:0;min-height:0}.grid{width:100%;height:100%;display:grid;gap:12px}.card{min-width:0;min-height:0;border:3px solid #d8d5cb;border-radius:16px;background:#fff;display:flex;flex-direction:column;gap:4px;cursor:pointer;padding:6%;overflow:hidden}.card-empty{min-width:0;min-height:0}.icon-box{flex:1 1 0;min-width:64px;min-height:64px;display:flex;align-items:center;justify-content:center}.icon-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:12px}.icon-placeholder{width:100%;height:100%;border-radius:12px;background:#f0dcc8;border:2px dashed #d8b896}.card .word{flex:0 0 auto;font-size:clamp(18px,2.6vw,24px);font-weight:700;color:#1a1a1a;text-align:center;overflow-wrap:break-word}.pagination{flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:8px;padding:4px 8px;border-radius:14px;background:#e2e0d8}.page-btn{min-width:56px;min-height:56px;border-radius:10px;border:2px solid #c8c5bb;background:#fff;font-size:22px;font-weight:700;color:#3a3a36;cursor:pointer}.page-btn:disabled{opacity:.35;cursor:default}.page-indicator{font-size:18px;font-weight:700;color:#514f49;min-width:48px;text-align:center}.utility-bar{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:8px 16px;background:#f3f1ea;border-top:2px solid #e2e0d8}.search-btn{display:flex;align-items:center;gap:6px;border:2px solid #c8c5bb;background:#fff;border-radius:12px;padding:0 14px;min-height:48px;font-size:18px;font-weight:700;color:#3a3a36;cursor:pointer}.clear-all-btn{display:flex;align-items:center;gap:6px;border:2px solid #9a968c;background:#fff;border-radius:10px;padding:0 14px;min-height:44px;font-size:18px;font-weight:700;color:#514f49;cursor:pointer}.lock-btn{width:44px;height:44px;border-radius:50%;border:2px solid #c8c5bb;background:#fff;display:flex;align-items:center;justify-content:center;color:#999;cursor:pointer;font-size:16px}@media (max-height: 420px){[data-layout=sidebar] .pinned-btn{min-height:56px}.sidebar{padding:2px 10px;gap:2px}.sidebar .categories{gap:0}.page-btn{min-width:44px;min-height:44px;font-size:18px}}.pinned-group--inline{order:-2;flex:0 0 auto;gap:6px}.pinned-group--inline .pinned-btn{flex:0 0 auto;min-width:48px;min-height:44px;padding:0 10px;font-size:16px}
