:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --panel-soft: #fbfbfa;
  --text: #111827;
  --muted: #69707d;
  --line: #e4e5e7;
  --accent: #f2a900;
  --accent-strong: #cf8500;
  --accent-soft: #fff7df;
  --selected: #fff9e9;
  --hover: #f4f4f2;
  --shadow: 0 18px 50px rgb(17 24 39 / 0.08);
}

html[data-theme="dark"] {
  --bg: #0d1117;
  --panel: #11161e;
  --panel-soft: #151b24;
  --text: #f2f3f5;
  --muted: #9da5b2;
  --line: #29303a;
  --accent: #f0ac19;
  --accent-strong: #ffc449;
  --accent-soft: #302819;
  --selected: #292318;
  --hover: #1a2029;
  --shadow: 0 18px 50px rgb(0 0 0 / 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.tknlj-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.icon { flex: 0 0 auto; }
.mail-app { min-height: 100dvh; display: grid; grid-template-columns: 236px minmax(390px, 480px) minmax(500px, 1fr); background: var(--bg); overflow: hidden; }
.sidebar, .inbox-panel, .reader-panel { height: 100dvh; background: var(--panel); }
.sidebar { position: relative; z-index: 30; display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 26px 15px 18px; overflow-y: auto; }
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 28px; }
.logo { font-size: 32px; line-height: 1; font-weight: 900; letter-spacing: -2.2px; }
.logo span { color: var(--accent); }
.folder-search, .header-search { height: 42px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 9px; padding: 0 12px; color: var(--muted); background: var(--panel-soft); }
.folder-search input, .header-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.folder-search input::placeholder, .header-search input::placeholder { color: var(--muted); }
.folder-list { display: flex; flex-direction: column; gap: 3px; margin-top: 24px; }
.folder-list button, .folder-list a { position: relative; width: 100%; border: 0; border-radius: 8px; background: transparent; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; min-height: 42px; padding: 0 10px; text-align: left; cursor: pointer; }
.folder-list button:hover, .folder-list a:hover { background: var(--hover); }
.folder-list button.active, .folder-list a.active { background: var(--hover); font-weight: 700; }
.folder-list button.active::before, .folder-list a.active::before { content: ""; position: absolute; left: -15px; width: 3px; height: 24px; background: var(--accent); border-radius: 0 3px 3px 0; }
.folder-list button b, .folder-list a b { min-width: 24px; border-radius: 20px; padding: 3px 7px; background: var(--hover); color: var(--muted); font-size: 12px; text-align: center; }
.folder-list .group-start { margin-top: 12px; padding-top: 8px; min-height: 50px; border-top: 1px solid var(--line); border-radius: 0; }
.folder-icon { display: grid; place-items: center; color: var(--folder-color); }
.private-folder-mark { display: grid; place-items: center; color: var(--accent-strong); }
.folder-list a:has(.private-folder-mark) { grid-template-columns: 25px 1fr auto auto; }
.account-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 16px; padding: 16px 8px 4px; font-size: 12px; }
.account-box div { display: grid; gap: 2px; }
.account-box div a { color: var(--muted); }
.account-login, .account-register { flex: 1; border: 1px solid var(--line); border-radius: 7px; padding: 9px 7px; text-align: center; font-weight: 700; }
.account-register { border-color: var(--accent); background: var(--accent); color: #16120a; }
.google-login-button { flex: 0 0 100%; width: 100%; overflow: hidden; }
.personal-folder { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; border-top: 1px solid var(--line); margin-top: 12px; padding: 18px 10px; font-size: 14px; }
.personal-folder button { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.theme-switch { margin-top: auto; border: 0; border-top: 1px solid var(--line); background: transparent; display: flex; align-items: center; gap: 10px; padding: 18px 10px 0; color: var(--muted); cursor: pointer; }
.inbox-panel { min-width: 0; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.inbox-header { position: sticky; top: 0; z-index: 5; min-height: 88px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 0 18px; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(12px); }
.inbox-header h1 { margin: 0; font-size: 20px; letter-spacing: -0.4px; }
.inbox-header span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.header-search { width: 112px; margin-left: auto; transition: width .2s ease; }
.header-search:focus-within { width: 180px; }
.article-list { padding: 8px 12px 30px; }
.article-row { position: relative; border-bottom: 1px solid var(--line); border-radius: 7px; transition: background .15s ease, border-color .15s ease; }
.article-row:hover { background: var(--hover); }
.article-row.selected { background: var(--selected); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); margin: 3px 0; }
.article-main { width: 100%; min-height: 91px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: start; border: 0; background: transparent; padding: 13px 74px 13px 8px; text-align: left; cursor: pointer; }
.unread-dot { width: 8px; height: 8px; border: 1px solid #aab0b8; border-radius: 50%; margin-top: 29px; }
.unread .unread-dot { background: var(--accent); border-color: var(--accent); }
.row-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.row-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.row-meta em { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 999px; padding: 2px 6px; color: var(--accent-strong); font-size: 10px; font-style: normal; }
.row-copy strong { display: block; overflow: hidden; color: var(--text); font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.read .row-copy strong { font-weight: 500; }
.row-spot { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.article-main time { color: var(--muted); font-size: 11px; padding-top: 25px; white-space: nowrap; }
.row-star { position: absolute; top: 11px; right: 8px; border: 0; background: transparent; color: transparent; cursor: pointer; stroke: var(--muted); }
.article-row:hover .row-star, .row-star:focus-visible, .row-star.active { color: var(--accent); stroke: var(--accent); }
.row-star.active .icon { fill: currentColor; }
.row-order { position: absolute; right: 8px; bottom: 9px; border: 0; border-radius: 999px; background: transparent; color: transparent; padding: 3px 7px; font-size: 10px; cursor: pointer; }
.article-row:hover .row-order, .row-order:focus-visible, .row-order.active { background: var(--hover); color: var(--muted); }
.row-order.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.reader-panel { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.reader-inner { width: min(760px, calc(100% - 56px)); margin: 0 auto; padding: 42px 0 70px; }
.article-kicker { display: flex; align-items: center; gap: 8px; color: var(--accent-strong); font-size: 13px; font-weight: 700; }
.article-kicker > span:not(.reader-categories), .reader-categories a { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 999px; padding: 4px 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.reader-categories { display: contents; }
.reader-panel h1, .reader-panel h2 { max-width: 800px; margin: 17px 0 14px; font-size: clamp(32px, 3.1vw, 52px); line-height: 1.04; letter-spacing: -1.8px; }
.lead { margin: 0 0 22px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.byline { display: flex; align-items: center; gap: 10px; padding: 4px 0 18px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--text); color: var(--panel); font-size: 11px; font-weight: 800; }
.byline b, .byline small { display: block; }
.byline b { font-size: 13px; }
.byline small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.action-bar button, .action-bar .reader-action { min-height: 36px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); padding: 0 12px; font-size: 12px; cursor: pointer; }
.action-bar button:hover, .action-bar .reader-action:hover { background: var(--hover); }
.action-bar button.active { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-strong); }
.action-bar button.active .icon { fill: var(--accent); }
.action-bar .more-action { margin-left: auto; padding: 0 9px; }
.share-control { position: relative; }
.share-menu { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 235px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); padding: 8px; }
.share-menu[hidden] { display: none; }
.action-bar .share-menu a, .action-bar .share-menu button { min-width: 0; min-height: 45px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); padding: 7px 8px; text-decoration: none; }
.action-bar .share-menu a:hover, .action-bar .share-menu button:hover { background: var(--hover); }
.share-menu b { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; border-radius: 7px; background: var(--text); color: var(--panel); font-size: 12px; }
.share-menu span { display: block; text-align: left; line-height: 1.2; }
.share-menu small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.share-menu [data-share-native] { grid-column: 1 / -1; }
.article-body { padding-top: 24px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.75; }
.article-body > p { margin: 0 0 1.35em; }
.reader-media { margin-top: 24px; }
.reader-media img { display: block; width: 100%; height: auto; border-radius: 10px; }
.reader-panel.is-loading .reader-inner { opacity: .55; }
.fact-card { display: grid; grid-template-columns: 140px 1fr; gap: 4px 20px; margin: 34px 0; border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 24px; font-family: Arial, Helvetica, sans-serif; }
.fact-card b { grid-row: span 2; color: var(--accent-strong); font-size: 38px; line-height: 1; letter-spacing: -1.5px; }
.fact-card strong { font-size: 16px; }
.fact-card p { grid-column: 2; margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.source-line { display: flex; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; }
.source-line span { color: var(--muted); }
.source-line a { color: var(--accent-strong); font-weight: 700; }
.reader-comments { padding-top: 22px; font-size: 13px; }
.reader-comments a { color: var(--accent-strong); font-weight: 700; }
.reply-thread { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 6px; transition: background .2s ease; }
.reply-thread h2 { margin: 18px 0; font-size: 22px; letter-spacing: -.3px; }
.reply-list { margin: 0; padding: 0; list-style: none; }
.reply-list .comment { border-bottom: 1px solid var(--line); padding: 14px 0; }
.reply-list .comment-body { display: grid; grid-template-columns: 38px 1fr; gap: 0 10px; }
.reply-list .comment-author, .reply-list .comment-meta, .reply-list p { grid-column: 2; }
.reply-list .avatar { grid-column: 1; grid-row: 1 / span 3; border-radius: 50%; }
.reply-list .children { margin-left: 46px; padding-left: 12px; list-style: none; border-left: 2px solid var(--line); }
.reply-form { display: grid; gap: 8px; margin-top: 18px; }
.reply-form textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--text); padding: 12px; }
.reply-form button { justify-self: start; border: 0; border-radius: 8px; background: var(--accent); color: #16120a; padding: 10px 16px; font-weight: 800; cursor: pointer; }
.reader-comments.reply-focus { background: var(--accent-soft); border-radius: 10px; outline: 8px solid var(--accent-soft); }
.inbox-loader { display: grid; justify-items: center; gap: 10px; padding: 4px 18px 30px; color: var(--muted); font-size: 12px; }
.inbox-loader button { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--text); padding: 10px 14px; cursor: pointer; }
.load-sentinel { width: 1px; height: 1px; }
.empty-state { min-height: 300px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-state h2 { margin: 12px 0 2px; color: var(--text); font-size: 18px; }
.empty-state p { font-size: 13px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--hover); }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 9px; max-width: 340px; border: 1px solid var(--line); border-radius: 10px; background: var(--text); color: var(--panel); box-shadow: var(--shadow); padding: 13px 16px; font-size: 13px; }
.mobile-only, .bottom-nav, .drawer-scrim { display: none; }

@media (max-width: 1180px) {
  .mail-app { grid-template-columns: 210px 390px minmax(440px, 1fr); }
  .sidebar { padding-left: 11px; padding-right: 11px; }
  .folder-list button.active::before { left: -11px; }
  .reader-inner { width: min(680px, calc(100% - 40px)); }
  .reader-panel h1, .reader-panel h2 { font-size: 36px; }
  .desktop-search { display: none; }
}

@media (max-width: 820px) {
  body { overflow: hidden; }
	.share-menu { position: fixed; right: 14px; bottom: 84px; left: 14px; top: auto; width: auto; }
  .mobile-only { display: grid; }
  .mail-app { display: block; min-height: 100dvh; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(84vw, 330px); height: 100dvh; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .drawer-scrim.is-visible { display: block; position: fixed; z-index: 20; inset: 0; border: 0; background: rgb(0 0 0 / .35); }
  .inbox-panel { height: 100dvh; padding-bottom: 74px; border: 0; }
  .inbox-panel.mobile-hidden { display: none; }
  .inbox-header { min-height: 106px; align-items: flex-start; padding: 18px 18px 14px; }
  .inbox-header > div { flex: 1; padding-top: 2px; }
  .inbox-header h1 { font-size: 27px; }
  .article-list { padding: 7px 14px 24px; }
  .article-row { border-radius: 10px; }
  .article-main { min-height: 119px; grid-template-columns: 13px minmax(0, 1fr) auto; padding: 14px 78px 14px 2px; }
  .row-order { color: var(--muted); }
  .article-row.selected { margin: 5px 0; }
  .unread-dot { margin-top: 35px; }
  .row-copy { gap: 7px; }
  .row-copy strong { font-size: 17px; line-height: 1.28; }
  .row-meta { font-size: 13px; }
  .row-spot { font-size: 14px; }
  .article-main time { padding-top: 61px; font-size: 12px; }
  .row-star { top: 13px; }
  .reader-panel { display: none; }
  .reader-panel.mobile-reading { display: block; position: fixed; z-index: 40; inset: 0; height: 100dvh; background: var(--panel); }
  .reader-inner { width: min(100% - 36px, 680px); padding: 0 0 60px; }
  .mobile-reader-bar { position: sticky; top: 0; z-index: 3; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(12px); min-height: 58px; margin-bottom: 28px; }
  .mobile-reader-bar button { border: 0; background: transparent; display: flex; align-items: center; gap: 3px; padding: 10px 0; cursor: pointer; }
  .mobile-reader-bar button:last-child { justify-content: center; width: 42px; }
  .mobile-reader-bar button.active { color: var(--accent); }
  .mobile-reader-bar button.active .icon { fill: currentColor; }
  .reader-panel h1, .reader-panel h2 { font-size: 37px; }
  .lead { font-size: 17px; }
  .article-body { font-size: 18px; }
  .action-bar button span { display: none; }
  .action-bar button { padding: 0 10px; }
  .fact-card { grid-template-columns: 1fr; }
  .fact-card b { grid-row: auto; }
  .fact-card p { grid-column: 1; }
  .bottom-nav { position: fixed; z-index: 10; inset: auto 0 0; height: 70px; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 96%, transparent); backdrop-filter: blur(12px); }
  .bottom-nav.mobile-hidden { display: none; }
  .bottom-nav button, .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
  .bottom-nav button.active, .bottom-nav a.active { color: var(--accent-strong); }
  .toast { right: 14px; bottom: 84px; left: 14px; max-width: none; }
}

@media (max-width: 480px) {
  .inbox-header { min-height: 98px; }
  .inbox-header h1 { font-size: 25px; }
  .article-main { min-height: 111px; }
  .row-copy strong { font-size: 16px; }
  .reader-panel h1, .reader-panel h2 { font-size: 32px; letter-spacing: -1.2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
