:root {
  --paper: #f3eee4;
  --ink: #2b2a27;
  --soft: #6f6a60;
  --hair: rgba(43, 42, 39, .16);
  --card: #faf7f0;
  --accent: #c8553d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, "Helvetica Neue", "PingFang SC", "Segoe UI", Arial, sans-serif;
}
:lang(ja) { --serif: "Iowan Old Style", Palatino, "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", Georgia, serif; --sans: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", sans-serif; }
:lang(ko) { --serif: "Iowan Old Style", Palatino, "AppleMyungjo", "Nanum Myeongjo", "Noto Serif CJK KR", Georgia, serif; --sans: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }
* { box-sizing: border-box; }
html { background: var(--paper); }
body { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }

.masthead, main, .colophon { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 max(32px, env(safe-area-inset-right)) 0 max(32px, env(safe-area-inset-left)); }
.masthead { padding-top: 40px; padding-bottom: 28px; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; min-height: 34px; }
.kicker { font-size: 11px; letter-spacing: .24em; color: var(--soft); }
.lang { position: relative; display: inline-flex; align-items: center; flex: none; }
.lang .globe { position: absolute; left: 12px; width: 13px; height: 13px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236f6a60' stroke-width='1.2'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M1.5 8h13M8 1.5c2 2 2.8 4 2.8 6.5S10 12.5 8 14.5M8 1.5C6 3.5 5.2 5.5 5.2 8S6 12.5 8 14.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.lang select { font: inherit; font-size: 13px; color: var(--ink); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f6a60' stroke-width='1.3'/%3E%3C/svg%3E") right 12px center / 9px no-repeat; border: 1px solid var(--hair); border-radius: 999px; padding: 7px 30px 7px 32px; cursor: pointer; -webkit-appearance: none; appearance: none; min-height: 34px; }
.lang select:hover, .lang select:focus-visible { border-color: var(--ink); outline: none; }
h1 { font-family: var(--serif); font-weight: 500; font-size: 64px; line-height: 1; letter-spacing: -.01em; margin: 0 0 14px; }
.lede { max-width: 520px; margin: 0 0 32px; color: var(--soft); font-size: 15px; line-height: 1.6; border-top: 1px solid var(--hair); padding-top: 12px; }

.search { display: block; max-width: 640px; }
.search input { width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; padding: 14px 24px; outline: none; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: #a39c90; }
.search input:focus { box-shadow: 0 0 0 4px rgba(200, 85, 61, .14); border-color: var(--accent); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer; opacity: .55; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%232b2a27' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.count { margin-top: 12px; padding-left: 24px; font-size: 12px; color: var(--soft); min-height: 1em; }

main { flex: 1; padding-bottom: 64px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card a { display: block; height: 100%; color: inherit; text-decoration: none; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card a:focus-visible, .card a:active { transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(43, 42, 39, .35); border-color: rgba(43, 42, 39, .3); outline: none; }
.card .thumb { aspect-ratio: 16 / 10; background: #e7e0d2; border-bottom: 1px solid var(--hair); }
.card .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px 16px 16px; }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.card h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0; }
.card .cat { font-size: 11px; letter-spacing: .16em; color: var(--soft); white-space: nowrap; }
.card p { margin: 0; color: var(--soft); font-size: 13px; line-height: 1.55; }
.card .via, .card .note { margin-top: 8px; font-size: 12px; color: var(--soft); }
.card .note { opacity: .8; }
@media (hover: hover) { .card a:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(43, 42, 39, .35); border-color: rgba(43, 42, 39, .3); } }
mark { background: none; color: var(--accent); font-weight: 600; }

.empty { color: var(--soft); font-size: 15px; font-family: var(--serif); }
.colophon { padding-bottom: max(28px, env(safe-area-inset-bottom)); color: var(--soft); font-size: 11px; letter-spacing: .2em; }
.colophon div { border-top: 1px solid var(--hair); padding-top: 20px; }

@media (max-width: 640px) {
  .masthead, main, .colophon { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .masthead { padding-top: 16px; padding-bottom: 20px; }
  .topline { margin-bottom: 20px; }
  .kicker { font-size: 10px; letter-spacing: .16em; }
  .lede { font-size: 14px; margin-bottom: 24px; }
  h1 { font-size: 44px; }
  .search input { font-size: 16px; padding: 12px 18px; }
  .lang select { font-size: 16px; padding: 5px 28px 5px 30px; }
  .count { padding-left: 18px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
}
