
:root { --accent: #4a3aff; --accent-dark: #3a2ad0; --accent-soft: #f0f0ff; --accent-border: #d0d0ff; --page-bg: #f4f4f8}
html.mode-prompt { --accent: #e8590c; --accent-dark: #c2410c; --accent-soft: #fff4e6; --accent-border: #ffd8a8; --page-bg: #faf5f0}
html.mode-prompt .ooc-only { display:none!important}
html:not(.mode-prompt) .prompt-only { display:none!important}
html:not(.logged-in) .login-only { display:none!important}
html.logged-in .logout-only { display:none!important}
* { box-sizing:border-box}
html,body { max-width:100%; overflow-x:hidden}
body { font-family:Apple SD Gothic Neo,Malgun Gothic,sans-serif; background:var(--page-bg); margin:0; padding:20px}
.container { background:#fff; border-radius:12px; box-shadow:0 2px 10px #00000014; padding:24px; width:100%; max-width:600px; margin:0 auto}
.view { display:none}
h1 { font-size:20px; margin:0 0 16px; color:#333}
a { color:inherit}
.brand-header { text-align:center; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #eee}
.brand-header .logo { font-size:40px; line-height:1; margin-bottom:4px}
.brand-header .brand-name { font-size:28px; font-weight:800; color:var(--accent); margin:0}
.brand-header .tagline { font-size:13px; color:#888; margin-top:4px}
.brand-header .mode-hint { font-size:12px; color:#aaa; margin:6px 0 0}
.logo-btn { border:none; background:none; padding:4px 8px; cursor:pointer; border-radius:12px; transition:transform .15s}
.logo-btn:hover { background:var(--accent-soft); transform:scale(1.1)}
.logo-btn.big { font-size:64px; padding:8px 16px}
.logo-btn.spin { animation:pop .5s ease}
@keyframes pop { 0% { transform:scale(1)}
40% { transform:scale(1.3) rotate(-12deg)}
to { transform:scale(1)}
}
.navbar { max-width:600px; margin:0 auto 12px; display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px; color:#888}
.nav-group { display:flex; align-items:center; gap:6px; flex-wrap:wrap}
.nav-home { text-decoration:none; font-weight:700; color:var(--accent); font-size:14px}
.user-email { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#555}
.btn-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px}
.btn-primary { display:inline-block; padding:10px 20px; border:none; border-radius:8px; background:var(--accent); color:#fff; font-size:15px; font-weight:700; cursor:pointer; text-decoration:none}
.btn-primary:hover { background:var(--accent-dark)}
.btn-primary:disabled { background:#aaa; cursor:not-allowed}
.btn-secondary { display:inline-block; padding:10px 20px; border:1px solid var(--accent); border-radius:8px; background:#fff; color:var(--accent); font-size:15px; font-weight:700; cursor:pointer; text-decoration:none}
.btn-secondary.active { background:var(--accent); color:#fff}
.btn-small { padding:6px 12px; border:1px solid #ccc; border-radius:6px; background:#fff; color:#444; font-size:13px; cursor:pointer; text-decoration:none; display:inline-block}
.btn-link { border:none; background:none; color:var(--accent); font-size:14px; text-decoration:underline; cursor:pointer; padding:4px 0}
.btn-danger { color:#e74c3c; border-color:#f3c0ba}
.menu-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px}
.menu-btn { display:flex; flex-direction:column; align-items:center; gap:6px; padding:18px 8px; border:1px solid var(--accent-border); border-radius:12px; background:var(--accent-soft); color:var(--accent); text-decoration:none; font-size:26px}
.menu-btn span { font-size:15px; font-weight:700}
.menu-btn:hover { background:#fff}
.menu-btn.wide { grid-column:1 / -1}
.warn-banner { margin:0 0 16px; padding:12px 14px; border-radius:10px; background:#ffe4ec; border:1px solid #ffc2d4; color:#b4235a; font-size:14px; line-height:1.5; text-align:center; word-break:keep-all}
.login-hint { text-align:center; font-size:13px; color:#999; margin:14px 0 0}
.lucky-card { display:none; margin:4px 0 8px; padding:16px; border-radius:12px; background:linear-gradient(135deg,#fff8e1,#f0f0ff); border:1px solid #ffe08a}
.lucky-card.show { display:block}
.lucky-label { font-size:13px; font-weight:700; color:#b7791f; margin-bottom:6px}
.lucky-title { font-size:18px; font-weight:800; color:#333; margin-bottom:6px; word-break:break-all}
.lucky-preview { font-size:14px; color:#555; line-height:1.5; white-space:pre-wrap; word-break:break-all; max-height:7.5em; overflow:hidden; margin-bottom:10px}
.quick-buttons,.custom-buttons { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px}
.quick-buttons button { padding:8px 14px; border:1px solid #ddd; border-radius:8px; background:var(--accent-soft); color:var(--accent); font-size:14px; cursor:pointer}
.custom-buttons button { padding:8px 14px; border:1px solid #bfe6cf; border-radius:8px; background:#effaf3; color:#1f8a4c; font-size:14px; cursor:pointer}
.tag-picker { display:flex; flex-wrap:wrap; gap:6px}
.tag-chip { padding:5px 10px; border:1px solid var(--accent-border); border-radius:999px; background:#fff; color:var(--accent); font-size:13px; cursor:pointer; text-decoration:none; display:inline-block}
.tag-chip.on { background:var(--accent); color:#fff; border-color:var(--accent)}
.tag-list { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px}
.tag-list .tag-chip { padding:2px 8px; font-size:12px; cursor:pointer}
textarea { width:100%; min-height:220px; padding:12px; font-size:15px; line-height:1.5; border:1px solid #ccc; border-radius:8px; resize:vertical; font-family:inherit; margin-bottom:16px}
textarea:focus { outline:none; border-color:var(--accent)}
textarea[readonly] { background:#fafafa}
.text-input { width:100%; padding:10px; font-size:16px; border:1px solid #ccc; border-radius:8px; font-family:inherit}
#sc-text { min-height:70px; margin:8px 0}
.feedback { font-size:14px; font-weight:700}
.feedback.success { color:#2ecc71}
.feedback.error { color:#e74c3c}
.option-box { background:#fafafa; border:1px solid #eee; border-radius:8px; padding:12px; margin-bottom:16px}
.check-label { display:flex; align-items:flex-start; gap:8px; font-size:15px; line-height:1.4; cursor:pointer}
.check-label input { width:20px; height:20px; flex-shrink:0; margin:0}
.field-label { display:block; font-size:14px; color:#555; margin-bottom:6px}
.field-label.gap { margin-top:14px}
.field-hint { font-size:12px; color:#999; margin:6px 0 0; line-height:1.4}
.file-btn { display:inline-block}
.thumb-preview { display:block; max-width:100%; max-height:240px; border-radius:8px; margin-top:8px; border:1px solid #eee}
.password-row { margin-top:12px}
.password-row label { display:block; font-size:14px; color:#555; margin-bottom:6px}
.public-hint { font-size:12px; color:#999; margin:-4px 0 12px; line-height:1.4}
#publish-result { display:none; margin-top:16px; padding:12px; background:var(--accent-soft); border:1px solid var(--accent-border); border-radius:8px}
#publish-result.show { display:block}
#publish-meta { margin:6px 0; font-size:14px; color:#555; word-break:break-all}
#share-link { width:100%; padding:8px; font-size:14px; border:1px solid #ccc; border-radius:6px; margin:8px 0}
.edit-banner { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 12px; margin-bottom:12px; background:#fff8e6; border:1px solid #ffe2a8; border-radius:8px; font-size:14px; font-weight:700; color:#8a5a00}
.viewer-title { font-size:20px; font-weight:800; color:#333; margin:0 0 8px; word-break:break-all}
.name-swap { margin:4px 0 12px; padding:12px; border:1px solid var(--accent-border); border-radius:10px; background:var(--accent-soft)}
.name-swap-title { font-size:14px; font-weight:700; color:var(--accent); margin-bottom:8px}
.name-swap label { display:flex; align-items:center; gap:8px; font-size:14px; margin-bottom:6px}
.name-swap label:last-child { margin-bottom:0}
.name-swap code { flex-shrink:0; min-width:72px}
.name-swap input { flex:1; min-width:0; padding:8px; border:1px solid #ccd; border-radius:8px; font-size:14px}
.viewer-thumb { display:block; max-width:100%; border-radius:10px; margin:12px auto 16px; border:1px solid #eee}
#viewer-tags,.viewer-list-link { margin-bottom:12px}
#description-input { min-height:5em; margin-bottom:0}
#viewer-description { white-space:pre-wrap; overflow-wrap:anywhere; color:#555; line-height:1.5}
.tabs { display:flex; gap:6px; margin-bottom:14px}
.tab { flex:1; padding:9px; border:1px solid #ddd; border-radius:8px; background:#fff; color:#666; font-size:14px; font-weight:700; cursor:pointer}
html:not(.mode-prompt) .tab[data-mode=ooc],html.mode-prompt .tab[data-mode=prompt] { background:var(--accent); border-color:var(--accent); color:#fff}
.search-row { display:flex; gap:8px; margin-bottom:10px}
.search-row .text-input { flex:1}
#search-view [hidden] { display:none}
#search-view .text-input { min-width:0}
.list-filters,.list-pages { display:flex; flex-wrap:wrap; gap:6px}
.list-filters { margin:12px 0}
.list-pages { justify-content:center; margin-top:16px; align-items:center}
.list-pages .btn-small,.list-filters .btn-small { line-height:1.5}
.list-pages [aria-current],.list-filters [aria-current] { background:var(--accent); border-color:var(--accent); color:#fff}
.list-item { display:flex; align-items:center; gap:10px; padding:10px; margin-bottom:6px; background:#fff; border:1px solid #eee; border-radius:8px}
.list-thumb { width:48px; height:48px; object-fit:cover; border-radius:6px; flex-shrink:0; border:1px solid #eee}
.list-main { flex:1; min-width:0; text-decoration:none; color:#333}
.list-title { font-size:14px; font-weight:700; word-break:break-all}
.list-sub { font-size:13px; color:#777; word-break:break-all; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.list-date { font-size:12px; color:#999; margin-top:2px}
.list-actions { display:flex; gap:4px; flex-shrink:0}
.panel { background:#fafafa; border:1px solid #eee; border-radius:8px; padding:12px; margin-bottom:16px}
.panel h3 { font-size:15px; margin:0 0 8px}
.sc-item { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid #eee; font-size:14px}
.sc-item span { word-break:break-all}
.need-login { text-align:center; color:#555; font-size:14px; padding:16px 0}
.gate-overlay { display:none; position:fixed; inset:0; background:#141428e0; align-items:center; justify-content:center; padding:20px; z-index:1000}
.gate-overlay.show { display:flex}
.gate-card { background:#fff; border-radius:12px; padding:24px; width:100%; max-width:420px}
.gate-card h2 { font-size:18px; margin:0 0 12px}
.gate-card p { font-size:14px; line-height:1.5; color:#555; margin:0 0 16px}
.gate-card .btn-row { margin:16px 0 0}
.gate-error { color:#e74c3c; font-size:14px; font-weight:700; margin-top:8px; min-height:18px}


.theme-slot { position: relative; }
.theme-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 170px; padding: 6px; background: #fff; border: 1px solid #ddd; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.theme-menu[hidden] { display: none; }
.theme-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: none; background: none; border-radius: 8px; font-size: 14px; color: #333; cursor: pointer; text-align: left; }
.theme-menu button:hover { background: #f4f4f8; }
.theme-menu button[aria-checked="true"] { font-weight: bold; background: #f0f0ff; }
.theme-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
