/* 架空のSNS「ひとこと」 */
:root {
  --bg: #f6f5f1; --card: #fff; --ink: #16181c; --sub: #6b7178; --line: #e7e5df; --accent: #4a45d1; --accent-soft: #ecebfb; --like: #e0245e;
  --radius: 18px; --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.75 var(--font); font-feature-settings: "palt"; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { display: grid; grid-template-columns: 232px minmax(0, 620px) 328px; gap: 0 28px; max-width: 1264px; margin: 0 auto; padding: 0 20px; align-items: start; }

/* 左ナビ */
.nav { position: sticky; top: 0; height: 100vh; padding: 18px 0 24px; display: flex; flex-direction: column; gap: 4px; }
.logo { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 14px; font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo svg { width: 34px; height: 34px; flex: none; }
.nav__item { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 999px; color: var(--ink); font-weight: 500; font-size: 1.05rem; transition: background .15s; }
.nav__item:hover { background: #ebe9e2; text-decoration: none; }
.nav__item.is-on { font-weight: 700; }
.nav__item svg { width: 24px; height: 24px; flex: none; }
.nav__post { margin-top: 14px; height: 50px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; letter-spacing: .08em; cursor: not-allowed; opacity: .92; }
.nav__me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 999px; color: var(--sub); font-size: .86rem; line-height: 1.4; }
.nav__me .av { width: 38px; height: 38px; }

/* 中央 */
.main { min-height: 100vh; background: var(--card); border-inline: 1px solid var(--line); }
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.top__logo { display: none; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; background: #f0efea; color: var(--ink); font-weight: 500; min-width: 0; }
.search svg { width: 18px; height: 18px; flex: none; color: var(--sub); }
.search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; border-radius: 50%; color: var(--ink); }
.back:hover { background: #f0efea; text-decoration: none; }
.back svg { width: 22px; height: 22px; }
.top__title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.top__title small { display: block; font-weight: 400; font-size: .8rem; color: var(--sub); }

.tag-head { padding: 22px 20px 6px; }
.tag-head h1 { margin: 0; font-size: clamp(1.5rem, 4.4vw, 1.95rem); font-weight: 900; letter-spacing: .01em; line-height: 1.3; }
.tag-head p { margin: 4px 0 0; color: var(--sub); font-size: .9rem; }
.tabs { display: flex; padding: 0 8px; }
.tab { flex: 1; position: relative; height: 52px; border: 0; background: none; color: var(--sub); font-weight: 700; cursor: pointer; transition: color .15s, background .15s; }
.tab:hover { background: #f6f5f1; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; margin-left: -28px; border-radius: 4px 4px 0 0; background: var(--accent); }

/* 投稿 */
.feed { list-style: none; margin: 0; padding: 0; }
.post { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 12px; padding: 16px 20px 10px; border-bottom: 1px solid var(--line); transition: background .15s; }
.post:hover { background: #fcfbf8; }
.feed.is-in .post { animation: postin .5s cubic-bezier(.2,.7,.2,1) both; }
.feed.is-in .post:nth-child(2) { animation-delay: .06s; } .feed.is-in .post:nth-child(3) { animation-delay: .12s; } .feed.is-in .post:nth-child(4) { animation-delay: .18s; }
@keyframes postin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.post__pin { grid-column: 2; display: flex; align-items: center; gap: 6px; margin: -4px 0 4px; color: var(--sub); font-size: .8rem; font-weight: 700; }
.post__pin svg { width: 14px; height: 14px; }
.av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; color: #fff; font-weight: 700; font-size: 1.05rem; line-height: 1; background: #999; }
.av svg { width: 100%; height: 100%; display: block; }
a.av:hover { text-decoration: none; filter: brightness(.95); }
.post__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; line-height: 1.45; }
.post__name { font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
a.post__name { padding: 11px 0; margin: -11px 0; min-width: 44px; }
.post__name svg { width: 17px; height: 17px; color: var(--accent); flex: none; align-self: center; }
.post__handle, .post__time { color: var(--sub); font-size: .88rem; }
.post__time::before { content: "・"; margin-right: 4px; }
.post__text { margin: 3px 0 0; font-size: 1rem; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.post__text .tag, .post__text .at { color: var(--accent); }
.post__media { margin: 12px 0 0; }
.post__acts { display: flex; justify-content: space-between; max-width: 380px; margin: 6px 0 0 -11px; }
.act { display: inline-flex; align-items: center; gap: 5px; min-width: 62px; height: 44px; padding: 0 11px; border: 0; border-radius: 999px; background: none; color: var(--sub); font-size: .84rem; font-variant-numeric: tabular-nums; cursor: pointer; transition: color .15s, background .15s; }
.act svg { width: 19px; height: 19px; flex: none; }
.act:hover { background: var(--accent-soft); color: var(--accent); }
.act--like:hover { background: #fde8ef; color: var(--like); }
.act--like[aria-pressed="true"] { color: var(--like); }
.act--like[aria-pressed="true"] svg { fill: currentColor; animation: pop .38s cubic-bezier(.3,1.8,.5,1); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.act[disabled] { cursor: default; }
.act[disabled]:hover { background: none; color: var(--sub); }

/* リンクカード */
.card { display: grid; grid-template-columns: 96px 1fr; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); background: #fff; transition: background .15s; }
.card:hover { background: #f8f7f3; text-decoration: none; }
.card__thumb { display: grid; place-items: center; background: #ece9df; color: #8a8478; min-height: 92px; }
.card__thumb svg { width: 40px; height: 40px; }
.card__body { padding: 12px 14px; min-width: 0; }
.card__site { color: var(--sub); font-size: .8rem; }
.card__title { font-weight: 700; line-height: 1.45; }
.card__desc { color: var(--sub); font-size: .84rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 写真 */
.m { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(0,0,0,.06); }

.m-kc { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 4% 0; }
.m-kc .kc { width: 42%; filter: drop-shadow(0 14px 14px rgba(40,25,10,.28)); transform: rotate(var(--r, -5deg)); }
.m-kc .kc + .kc { margin-left: -6%; }
.m-kc--two { grid-auto-flow: column; }
.m-kc--two .kc { width: 78%; }
.m-kc .kc svg { display: block; width: 100%; height: auto; }
.bg-hand { background: radial-gradient(70% 60% at 50% 110%, #e6b89a 0 46%, transparent 47%), radial-gradient(22% 44% at 26% 96%, #dba987 0 60%, transparent 62%), radial-gradient(22% 44% at 74% 96%, #dba987 0 60%, transparent 62%), linear-gradient(180deg, #8fa6b8, #c9d3d8 70%, #b9c2c4); }
.bg-desk { background: linear-gradient(180deg, rgba(255,255,255,.2), transparent 40%), repeating-linear-gradient(93deg, #c79f72 0 22px, #bd9566 22px 51px, #cfa97c 51px 64px); }
.bg-night { background: radial-gradient(40% 30% at 20% 20%, rgba(255,214,130,.55), transparent 70%), radial-gradient(30% 26% at 82% 30%, rgba(255,120,90,.4), transparent 70%), linear-gradient(180deg, #1f2337, #3a3148); }
.bg-yukata { background: repeating-linear-gradient(135deg, #2c4a7c 0 26px, #f4f1e6 26px 30px, #2c4a7c 30px 56px, #37599a 56px 82px); }
.bg-shop { background: linear-gradient(180deg, #f3e7cf 0 62%, #7a4e2c 62% 66%, #a8754a 66%); }
.bg-sea { background: linear-gradient(180deg, #cfd9dd 0 48%, #8fa1ab 48% 52%, #7c909b 52%); }
.bg-bag { background: radial-gradient(120% 90% at 50% 120%, #2b2e34 0 60%, transparent 61%), linear-gradient(180deg, #d9d2c5, #c8c0b2); }
.bg-sheet { background: repeating-linear-gradient(0deg, #fff 0 38px, #f1efe9 38px 40px), #fff; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2% 0; padding: 5% 4%; aspect-ratio: 4 / 3.3; align-items: center; }
.m-grid .kc { width: 86%; margin: 0 auto; filter: drop-shadow(0 8px 8px rgba(40,25,10,.22)); }
.m-grid .kc svg { display: block; width: 100%; height: auto; }
.m-bottom { display: grid; place-items: center; aspect-ratio: 16 / 9; background: radial-gradient(60% 90% at 50% 130%, #e3b393 0 60%, transparent 61%), radial-gradient(18% 60% at 18% 100%, #d9a684 0 60%, transparent 62%), linear-gradient(180deg, #54606b, #7d8992); }
.m-bottom .kb { width: 84%; transform: rotate(-3deg); filter: drop-shadow(0 10px 10px rgba(0,0,0,.35)); }
.m-bottom .kb svg { display: block; width: 100%; height: auto; }
.m-scene svg { display: block; width: 100%; height: auto; }

/* FAXを貼った掲示板 */
.m-fax.shot { padding: clamp(18px, 6%, 40px) clamp(22px, 10%, 70px); }
.m-fax .doc { --tilt: 1.4deg; font-size: clamp(6.4px, 1.72vw, 10.4px); line-height: 1.7; padding: 3.4em 2.2em 7.4em; }
.m-fax .doc h2 { margin: .6em 0 .5em; font-size: 1.7em; text-align: center; letter-spacing: .2em; }
.m-fax .doc p { margin: 0 0 .5em; }
.m-fax .doc .r { text-align: right; }
.m-fax .doc .c { text-align: center; }
.m-fax .doc dl { margin: .3em 0 .5em; display: grid; grid-template-columns: 5.6em 1fr; gap: .15em .6em; }
.m-fax .doc dt, .m-fax .doc dd { margin: 0; }
.m-fax .doc .url { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.m-fax .fax__head { font-size: .78em !important; top: 1em !important; left: 1.6em !important; right: 1.6em !important; }
.m-fax .memo-red { position: absolute; right: 9%; bottom: 8.5%; width: 44%; transform: rotate(-5deg); font-size: clamp(8px, 2.2vw, 13.5px); line-height: 1.45; color: #c22a20; z-index: 5; filter: none; }
.m-fax .pin { top: 4.5%; left: 50%; margin-left: -7px; }
.m-fax .other-paper { position: absolute; left: -4%; top: 16%; width: 20%; height: 44%; background: #f5efc9; transform: rotate(-7deg); box-shadow: 0 4px 8px -4px rgba(0,0,0,.5); }
.m-fax .other-paper + .other-paper { left: auto; right: -5%; top: 48%; width: 18%; height: 40%; background: #dfe9f2; transform: rotate(5deg); }

/* ノートの写真 */
.m-note { aspect-ratio: 4 / 3; }
.m-note [data-photo-slot], .m-note [data-photo-slot] svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-note .scribble { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }

/* 右カラム */
.aside { position: sticky; top: 0; padding: 14px 0 30px; display: grid; gap: 16px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.box h2 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 900; }
.trend { display: block; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); line-height: 1.45; }
.trend:first-of-type { border-top: 0; }
.trend small { display: block; color: var(--sub); font-size: .8rem; }
.trend b { font-weight: 700; }
span.trend { cursor: default; }
.foot { color: var(--sub); font-size: .8rem; line-height: 1.7; padding: 0 6px; }
.end { padding: 34px 20px 110px; text-align: center; color: var(--sub); font-size: .88rem; }
.end::before { content: ""; display: block; width: 6px; height: 6px; margin: 0 auto 14px; border-radius: 50%; background: var(--line); box-shadow: 14px 0 var(--line), -14px 0 var(--line); }

/* プロフィール */
.prof__banner { height: clamp(110px, 22vw, 190px); background: linear-gradient(0deg, rgba(255,255,255,.0), rgba(255,255,255,.0)), repeating-linear-gradient(0deg, transparent 0 21px, #c9d3da 21px 22px), repeating-linear-gradient(90deg, transparent 0 21px, #c9d3da 21px 22px), #e9eef0; position: relative; overflow: hidden; }
.prof__banner::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 120% at 85% 0%, rgba(255,255,255,.75), transparent 60%), linear-gradient(180deg, transparent 50%, rgba(60,70,80,.18)); }
.prof__body { padding: 0 20px 14px; }
.prof__row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -44px; position: relative; }
.prof__av { width: 96px; height: 96px; border: 4px solid #fff; background: #dfe4e6; }
.btn { height: 44px; padding: 0 20px; border: 1px solid #cfd3d6; border-radius: 999px; background: #fff; font-weight: 700; cursor: not-allowed; color: var(--sub); }
.prof__name { margin: 10px 0 0; font-size: 1.35rem; font-weight: 900; line-height: 1.3; }
.prof__handle { color: var(--sub); font-size: .92rem; }
.prof__bio { margin: 12px 0 10px; line-height: 1.85; }
.prof__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--sub); font-size: .88rem; }
.prof__meta span { display: inline-flex; align-items: center; gap: 6px; }
.prof__meta svg { width: 16px; height: 16px; }
.prof__num { display: flex; gap: 20px; margin-top: 10px; font-size: .9rem; color: var(--sub); }
.prof__num b { color: var(--ink); font-weight: 700; margin-right: 4px; }
.quiet { padding: 14px 20px; border-bottom: 1px solid var(--line); background: #faf9f5; color: var(--sub); font-size: .84rem; text-align: center; }

/* 下ナビ(スマホ) */
.tabbar { display: none; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 76px minmax(0, 620px) minmax(0, 300px); gap: 0 20px; }
  .nav__item span, .logo span, .nav__me span { display: none; }
  .nav__post { display: none; }
  .nav__item, .logo { justify-content: center; padding: 12px; }
}
@media (max-width: 940px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .aside { display: none; }
}
@media (max-width: 640px) {
  .app { display: block; padding: 0; }
  .nav { display: none; }
  .main { border: 0; }
  .top__logo { display: grid; place-items: center; width: 44px; height: 44px; flex: none; }
  .top__logo svg { width: 32px; height: 32px; }
  .top__row { padding: 9px 14px; }
  .tag-head { padding: 18px 16px 4px; }
  .post { grid-template-columns: 44px minmax(0, 1fr); gap: 0 10px; padding: 14px 16px 6px; }
  .av { width: 44px; height: 44px; }
  .post__acts { max-width: none; padding-right: 8%; }
  .prof__body { padding: 0 16px 12px; }
  .prof__av { width: 84px; height: 84px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; padding: 6px 0 max(6px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar span { display: grid; place-items: center; width: 56px; height: 46px; color: var(--ink); border-radius: 12px; }
  .tabbar svg { width: 25px; height: 25px; }
  .tabbar span { color: #b5b8bb; }
  .card { grid-template-columns: 76px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* 背景は生成した写真(assets/photo/bg-*.jpg)。置いていない場合は上のグラデーションのまま */
.bg-hand { background: url(../assets/photo/bg-hand.jpg) 50% 60% / cover, #caa48a; }
.bg-desk { background: url(../assets/photo/bg-desk.jpg) center / cover, #c79f72; }
.bg-night { background: url(../assets/photo/bg-night.jpg) center / cover, #1d1b2e; }
.bg-yukata { background: url(../assets/photo/bg-yukata.jpg) center / cover, #2c4a7c; }
.bg-shop { background: url(../assets/photo/bg-shop.jpg) center / cover, #7a4e2c; }
.bg-sea { background: url(../assets/photo/bg-sea.jpg) center / cover, #8fa1ab; }
.bg-bag { background: url(../assets/photo/bg-bag.jpg) center / cover, #2b2e34; }
.bg-sheet { background: url(../assets/photo/bg-sheet.jpg) center / cover, #f1efe9; }
.m-kc .kc { filter: drop-shadow(0 10px 10px rgba(20, 12, 4, .45)) drop-shadow(0 1px 1px rgba(20, 12, 4, .35)); }
