@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5e7eb;
  --line-strong: #d0d5dd;
  --brand: #19a974;
  --brand-dark: #10835a;
  --brand-soft: #eafaf3;
  --yellow: #ffcc33;
  --red: #d92d20;
  --amber: #b54708;
  --green: #087443;
  --blue: #2563eb;
  --shadow: 0 6px 18px rgba(16, 24, 40, .08);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }

.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(16,24,40,.04); }
.topbar { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 16px; align-items: center; }
.logo { display: inline-flex; align-items: center; min-width: fit-content; color: #fff; background: var(--brand); padding: 10px 14px; border-radius: 8px; font-weight: 800; letter-spacing: -.02em; }
.search { flex: 1; display: flex; border: 2px solid var(--brand); border-radius: 8px; overflow: hidden; background: #fff; }
.search input { border: 0; min-height: 42px; padding: 0 14px; flex: 1; font: inherit; outline: none; }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 18px; font-weight: 800; cursor: pointer; }
.nav { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; overflow-x: auto; gap: 4px; }
.nav a { display: block; padding: 12px 16px; font-weight: 800; color: #344054; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--brand-dark); border-bottom-color: var(--brand); }

.search { position: relative; }
.search-panel { position: absolute; left: 16px; right: 16px; top: 64px; max-width: 1180px; margin: 0 auto; z-index: 30; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 16px 32px rgba(16,24,40,.16); }
.search-panel[hidden] { display: none; }
.search-count, .search-empty { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.search-panel div { display: grid; gap: 8px; }
.search-panel a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: #344054; font-weight: 800; line-height: 1.45; }
.search-panel a:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.intent-cards { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.intent-cards a { display: grid; gap: 6px; padding: 13px; border: 1px solid #b7ebd2; border-radius: 12px; background: #fff; }
.intent-cards strong { color: var(--brand-dark); font-size: 15px; }
.intent-cards span { color: var(--muted); line-height: 1.55; font-size: 13px; }
.intent-cards a:hover { background: var(--brand-soft); border-color: var(--brand); }
.notice-strip b { color: #344054; }
.error-page .article-cta { margin-top: 18px; }
.footer a { display: inline-flex; padding: 4px 2px; color: var(--brand-dark); font-weight: 800; }

.layout { max-width: 1180px; margin: 18px auto 56px; padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.content { min-width: 0; }
.sidebar { display: grid; gap: 14px; position: sticky; top: 118px; }

.hero, .card, .side-card, .notice-strip { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.wiki-hero { padding: 24px; background: linear-gradient(135deg, #ffffff 0%, #f1fff8 100%); }
.badge, .step { display: inline-flex; width: fit-content; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.badge::before { content: ''; width: 7px; height: 7px; background: var(--brand); border-radius: 50%; }
h1 { margin: 12px 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -.05em; font-weight: 800; }
h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); line-height: 1.18; letter-spacing: -.03em; }
h3 { margin: 6px 0 8px; font-size: 18px; line-height: 1.35; letter-spacing: -.02em; }
h4 { margin: 18px 0 8px; font-size: 14px; color: #344054; }
.lead { margin: 0; max-width: 760px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.helper { color: var(--muted); line-height: 1.7; margin-top: 0; }

.quick-menu { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hero-visual, .article-eyecatch { margin: 16px 0; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.hero-visual img, .article-eyecatch img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.wiki-hero-visual { box-shadow: 0 10px 28px rgba(16, 24, 40, .10); }
.quick-menu a { display: grid; gap: 6px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.quick-menu strong { color: var(--brand); font-size: 13px; }
.quick-menu span { font-weight: 800; }
.quick-menu a:hover, .article-card:hover, .aff:hover, .list-news a:hover { border-color: var(--brand); background: #fbfffd; }
.notice-strip { margin: 14px 0; padding: 12px 14px; display: flex; gap: 10px; align-items: center; border-left: 5px solid var(--yellow); }
.notice-strip strong { white-space: nowrap; }
.notice-strip span { color: var(--muted); line-height: 1.6; }

.card { padding: 20px; margin-bottom: 16px; }
.main-tool { border-top: 5px solid var(--brand); }
.section-head { margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: #344054; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 13px; background: #fff; color: var(--text); font: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(25, 169, 116, .12); }
textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
button, .primary-link, .secondary-link { min-height: 44px; border-radius: 8px; padding: 0 16px; font: inherit; font-weight: 800; cursor: pointer; }
button { border: 0; background: var(--brand); color: #fff; }
button:hover { background: var(--brand-dark); }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.article-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.article-card span, .list-news span { display: inline-flex; margin-bottom: 8px; padding: 3px 7px; border-radius: 6px; background: #eef4ff; color: var(--blue); font-size: 12px; font-weight: 800; }
.article-card p { color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.app-rank-card { scroll-margin-top: 132px; }
.app-rank-card .guide-table div { grid-template-columns: 104px minmax(0, 1fr); padding: 10px; }
.app-rank-card .guide-table span { display: block; width: auto; margin: 0; padding: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.65; }
.app-rank-card .primary-link { width: 100%; margin-top: 12px; }
.article-page .article-grid:has(.app-rank-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.template-list { display: grid; gap: 10px; margin-top: 8px; }
.template-list article, .compare-table article { border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: #fff; }
.template-list p, .compare-table p { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }
.guide-table { display: grid; gap: 8px; margin: 8px 0 14px; }
.guide-table div { display: grid; grid-template-columns: 180px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.guide-table span { color: var(--muted); line-height: 1.55; }
.danger-guide div { border-left: 5px solid var(--yellow); }
.flow-list { display: grid; gap: 8px; padding-left: 0; list-style: none; counter-reset: flow; }
.flow-list li { counter-increment: flow; display: grid; grid-template-columns: 32px 150px 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.flow-list li::before { content: counter(flow); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.flow-list strong { display: flex; align-items: center; }
.flow-list span { color: var(--muted); line-height: 1.55; }
.compare-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.compare-table article { display: grid; gap: 6px; }
.compare-table span { width: fit-content; padding: 3px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.compare-table a { color: var(--brand-dark); font-weight: 800; }
.list-news { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.list-news a { display: grid; grid-template-columns: 96px auto 1fr; gap: 10px; align-items: center; padding: 13px 14px; background: #fff; border-bottom: 1px solid var(--line); font-weight: 800; }
.list-news a > img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.list-news a:not(:has(img)) { display: flex; }
.list-news a:last-child { border-bottom: 0; }
.list-news span { margin: 0; min-width: 64px; justify-content: center; }

.tier-table { display: grid; gap: 8px; }
.tier-row { display: grid; grid-template-columns: 64px 1fr; align-items: stretch; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.tier-row > strong { display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; }
.tier-row > div { display: grid; gap: 4px; padding: 12px 14px; }
.tier-row span { color: var(--muted); line-height: 1.55; }
.tier-row.ss > strong { background: #e11d48; }
.tier-row.s > strong { background: #f97316; }
.tier-row.a > strong { background: #eab308; }
.tier-row.b > strong { background: #22c55e; }
.tier-row.c > strong { background: #3b82f6; }
.tier-row.f > strong { background: #475467; }
.wiki-filter { margin: 0 0 14px; }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-card { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.type-card[hidden] { display: none; }
.type-card p { margin: 0 0 6px; color: var(--muted); line-height: 1.55; }
.type-card span { color: #344054; font-size: 13px; font-weight: 800; }
.avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-weight: 800; box-shadow: inset 0 -10px 20px rgba(0,0,0,.12); }
.avatar.safe { background: #12b76a; }
.avatar.neutral { background: #3b82f6; }
.avatar.caution { background: #f97316; }
.avatar.danger { background: #d92d20; }
.system-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.system-list a { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.system-list strong { color: var(--brand-dark); }
.system-list span { color: var(--muted); line-height: 1.5; }
.event-list { display: grid; gap: 10px; }
.event-list article { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.minor-events article { background: #fcfcfd; border-style: dashed; }
.event-list p { grid-column: 1 / -1; margin: 0; color: var(--muted); line-height: 1.55; }
.stars { color: #f59e0b; font-weight: 800; white-space: nowrap; }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checks label { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; }
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); }
.checks button { grid-column: 1 / -1; }

.result-box { margin-top: 16px; padding: 16px; min-height: 64px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.result-box.empty { color: #98a2b3; background: #f9fafb; }
.result-label { margin: 0 0 4px; color: var(--brand-dark); font-size: 13px; font-weight: 800; }
.next { margin: 12px 0; padding: 13px 14px; border-radius: 8px; border: 1px solid #b7ebd2; border-left: 5px solid var(--brand); background: var(--brand-soft); line-height: 1.65; }
.reply-list { display: grid; gap: 10px; }
.reply-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #f9fafb; }
.reply-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.copy-primary, .copy-btn { min-height: 34px; padding: 7px 11px; font-size: 13px; border-radius: 7px; }
.copy-primary { margin: 8px 6px 4px 0; }
.copy-btn { background: #fff; color: var(--brand-dark); border: 1px solid #b7ebd2; }
blockquote { margin: 10px 0 0; padding: 12px 14px; border-left: 4px solid var(--brand); background: #fff; border-radius: 8px; line-height: 1.7; color: #344054; }
.risk { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.risk.low { background: #ecfdf3; color: var(--green); }
.risk.medium { background: #fffaeb; color: var(--amber); }
.risk.high { background: #fef3f2; color: var(--red); }
.aff-list { display: grid; gap: 9px; }
.aff { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.aff span { color: var(--muted); line-height: 1.5; }
ul { padding-left: 1.2em; line-height: 1.75; }
pre { white-space: pre-wrap; overflow: auto; }
.breadcrumb { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.breadcrumb a { color: var(--brand-dark); font-weight: 800; }
.article-page { padding: 28px; }
.article-page h1 { font-size: clamp(30px, 4vw, 46px); }
.article-section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.article-section p { color: #344054; line-height: 1.9; font-size: 16px; }
.photo-example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.photo-example { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.photo-example img { display: block; width: 100%; aspect-ratio: 16 / 11; object-fit: cover; background: #f9fafb; }
.photo-example div { padding: 13px; }
.photo-example b { display: block; margin-bottom: 6px; font-size: 15px; }
.photo-example p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.photo-example.ok { border-top: 5px solid var(--brand); }
.photo-example.ng { border-top: 5px solid var(--red); }
.photo-order { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.photo-order div { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.photo-order strong { color: var(--brand-dark); }
.photo-order span { color: var(--muted); line-height: 1.55; }
.article-cta { margin-top: 28px; padding: 18px; border-radius: 10px; background: var(--brand-soft); border: 1px solid #b7ebd2; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.primary-link, .secondary-link { display: inline-flex; align-items: center; justify-content: center; }
.primary-link { background: var(--brand); color: #fff; }
.secondary-link { background: #fff; color: var(--brand-dark); border: 1px solid #b7ebd2; }
.list-news.compact a { font-size: 13px; line-height: 1.45; }

.side-card { padding: 16px; }
.side-card h2 { font-size: 18px; border-bottom: 2px solid var(--brand); padding-bottom: 8px; margin-bottom: 12px; }
.side-card > a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 800; }
.ranking { counter-reset: rank; display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.ranking li a { display: grid; gap: 3px; position: relative; padding: 12px 12px 12px 42px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.ranking li a::before { counter-increment: rank; content: counter(rank); position: absolute; left: 10px; top: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); font-size: 12px; font-weight: 800; }
.ranking span { color: var(--muted); font-size: 13px; }
.warning { border-top: 4px solid var(--yellow); }
.footer { max-width: 1180px; margin: 0 auto 40px; padding: 0 16px; color: var(--muted); line-height: 1.7; font-size: 13px; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { display: grid; }
  .search-panel { top: 112px; left: 10px; right: 10px; }
  .layout { margin-top: 12px; padding: 0 10px; }
  .grid, .checks, .article-grid, .quick-menu, .intent-cards, .sidebar, .type-grid, .system-list, .compare-table, .photo-example-grid, .photo-order { grid-template-columns: 1fr; }
  .list-news a { grid-template-columns: 82px 1fr; }
  .list-news a > img { width: 82px; }
  .list-news span { grid-column: 2; width: fit-content; }
  .guide-table div, .app-rank-card .guide-table div { grid-template-columns: 1fr; }
  .flow-list li { grid-template-columns: 32px 1fr; }
  .flow-list span { grid-column: 2; }
  .wiki-hero, .card { padding: 16px; }
  .notice-strip { align-items: flex-start; }
  h1 { font-size: 36px; }
}

.html-sitemap { display: grid; gap: 12px; padding-left: 0; list-style: none; }
.html-sitemap li { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.html-sitemap a { font-weight: 900; color: var(--brand-dark); }
.html-sitemap p { margin: 6px 0 0; color: var(--muted); line-height: 1.7; }
