/* 05 · 미나 다이어리 — 버터 옐로 · 크림 · 브라운. 모바일 우선. */
:root {
  --paper: #FFFBEF;
  --ink: #4E3624;
  --ink-2: #6A4E36;
  --brown: #8A5A34;
  --deep: #6B4428;
  --butter: #FFF1B8;
  --butter-2: #FFE38A;
  --kraft: #F3E5C2;
  --line: #EEDFB8;
  --margin-red: #EDB9A4;
  --tape: rgba(226, 190, 112, .72);
  --blue: #2F5D8A;

  --bar-bg: rgba(255, 251, 239, .97);
  --bar-visit-bg: #6B4428;
  --bar-visit-fg: #FFFBEF;
  --bar-tg-bg: #2F5D8A;
  --bar-tg-fg: #FFFFFF;
  --float-bg: #2F5D8A;
  --float-fg: #FFFFFF;
  --focus: #2F5D8A;
  --ph-bg: #F3E5C2;
  --banner-max: 920px;
  --banner-radius: 10px;
  --banner-pad: 24px 20px;
}

body {
  font-family: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--kraft);
  background-image:
    radial-gradient(rgba(138, 90, 52, .09) 1px, transparent 1.4px);
  background-size: 18px 18px;
}

.hand { font-family: 'Nanum Pen Script', 'Gowun Dodum', cursive; font-size: 26px; line-height: 1.2; font-weight: 400; }

/* ── 머리말 ─────────────────────────────── */
.top-in { max-width: 1160px; margin: 0 auto; padding: 14px 20px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: var(--ink); text-decoration: none; font-size: 20px; letter-spacing: -.01em; }
.logo-ico { width: 30px; height: 30px; color: var(--deep); }
.top-tag { font-family: 'Nanum Pen Script', cursive; font-size: 24px; color: var(--deep); line-height: 1; transform: rotate(-3deg); padding: 6px 12px; background: var(--butter-2); border-radius: 3px; }
.top-nav { display: none; }

.rings { max-width: 1160px; height: 30px; margin: 0 auto -16px; position: relative; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='30'%3E%3Ccircle cx='20' cy='23' r='4.2' fill='%235A3A1E'/%3E%3Crect x='17' y='1' width='6' height='23' rx='3' fill='%23C9B79B' stroke='%237C6650' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x center / 40px 30px;
  -webkit-mask: linear-gradient(90deg, transparent 0 14px, #000 14px calc(100% - 14px), transparent 0);
          mask: linear-gradient(90deg, transparent 0 14px, #000 14px calc(100% - 14px), transparent 0); }

/* ── 일기장 한 장 (main) ─────────────────── */
main { position: relative; max-width: 1160px; margin: 0 auto; background: var(--paper); padding-top: 12px;
  box-shadow: 0 1px 0 rgba(78, 54, 36, .06), 0 18px 40px rgba(78, 54, 36, .12); overflow: hidden; }

h1, h2, h3 { font-weight: 400; letter-spacing: -.02em; }
h2 { font-size: clamp(27px, 7vw, 38px); line-height: 1.3; margin-top: 4px; }
h3 { font-size: 21px; line-height: 1.4; }
.mark { background: linear-gradient(transparent 58%, var(--butter-2) 58% 94%, transparent 94%); padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: .06em; color: var(--brown); }
.kicker::before { content: ''; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.page-no { font-size: 26px; color: var(--brown); opacity: .8; margin-bottom: 2px; }
.sec-desc { margin-top: 14px; color: var(--ink-2); max-width: 34em; }

section { max-width: 1080px; margin: 0 auto; padding: 52px 20px; }
.center { text-align: center; }
.center .kicker { justify-content: center; }
.center-cta { display: flex; justify-content: center; margin-top: 36px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 14px 28px; border-radius: 999px;
  font-size: 17px; line-height: 1.3; text-decoration: none; text-align: center; transition: transform .2s ease, box-shadow .2s ease; }
.btn-visit { background: var(--deep); color: var(--paper); box-shadow: 0 4px 0 #E2BE70; }
.btn-line { background: var(--butter); color: var(--deep); border: 2px solid var(--deep); box-shadow: 0 4px 0 rgba(107, 68, 40, .18); margin-top: 22px; }
.btn-gold { background: #F2CB5E; color: #3B2716; box-shadow: 0 4px 0 #A87C2E; margin-top: 26px; }
.btn:hover, .tg-btn:hover { transform: translateY(-2px); }
.tg-btn { padding-left: 18px; padding-right: 20px; background: var(--blue); color: #fff; box-shadow: 0 4px 0 #B9CDE0; justify-content: center; font-weight: 400; }
.tg-btn .tg-label { font-size: 17px; white-space: nowrap; }
.letter-to, .letter-from { padding-inline: 8px; }
.tg-btn .tg-handle { font-size: 14px; font-weight: 400; opacity: .92; }
.float-tg { box-shadow: 0 10px 26px rgba(47, 93, 138, .35); }

.cta { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; max-width: 380px; }
.cta > * { width: 100%; }

/* 와시테이프 */
.tape { position: absolute; z-index: 3; width: 104px; height: 28px; background:
  repeating-linear-gradient(45deg, rgba(255, 255, 255, .35) 0 6px, transparent 6px 12px), var(--tape);
  box-shadow: 0 1px 2px rgba(78, 54, 36, .12); pointer-events: none; }
.tape-a { top: -14px; left: 50%; transform: translateX(-50%) rotate(-4deg); }
.tape-b { bottom: 54px; right: -22px; width: 70px; transform: rotate(-58deg); background:
  repeating-linear-gradient(90deg, rgba(255, 255, 255, .4) 0 5px, transparent 5px 10px), rgba(180, 206, 170, .75); }
.tape-s { top: -12px; left: 50%; width: 74px; height: 24px; transform: translateX(-50%) rotate(3deg); }

/* ── ① 인사 ─────────────────────────────── */
.hero { display: grid; grid-template-areas: "head" "pol" "body"; justify-items: start; padding-top: 44px; padding-bottom: 36px; }
.hero-head { grid-area: head; }
.hero-body { grid-area: body; }
.hero-pol { grid-area: pol; }
.hello { color: var(--brown); font-size: 32px; transform: rotate(-2deg); transform-origin: left; margin-bottom: 6px; }
h1 { font-size: clamp(36px, 10vw, 60px); line-height: 1.22; }
.cup { display: inline-block; width: .82em; height: .74em; color: var(--deep); vertical-align: -.02em; margin-left: .08em; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 26em; }

.mood { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; padding: 12px 16px; border: 1.5px dashed #D9C08E; border-radius: 12px; background: rgba(255, 241, 184, .45); }
.mood li { display: inline-flex; align-items: baseline; gap: 8px; }
.mood-k { font-size: 14px; color: var(--ink-2); }
.mood-v { display: inline-flex; align-items: center; gap: 4px; font-size: 28px; color: var(--deep); }
.mood-v svg { width: 20px; height: 20px; color: var(--deep); }

.polaroid { position: relative; background: #fff; padding: 12px 12px 0; box-shadow: 0 2px 4px rgba(78, 54, 36, .1), 0 16px 34px rgba(78, 54, 36, .18); }
.hero-pol { width: min(78vw, 330px); justify-self: center; margin: 34px 0 30px; transform: rotate(2deg); }
.pol-ph { aspect-ratio: 427 / 526; }
.polaroid figcaption { text-align: center; padding: 12px 6px 16px; font-size: 30px; color: var(--ink); }

/* ── 일기 한 장 ─────────────────────────── */
.entry { position: relative; }
.lined { margin-top: 22px; padding: 0 0 0 18px; border-left: 2px solid var(--margin-red);
  line-height: 36px; background: repeating-linear-gradient(to bottom, transparent 0 35px, var(--line) 35px 36px); }
.lined p + p { margin-top: 0; }
.sign { font-size: 28px; line-height: 36px; color: var(--brown); text-align: right; padding-right: 4px; }
.toc { margin-top: 28px; background: #fff; border-radius: 6px; padding: 8px 18px; box-shadow: 0 8px 22px rgba(78, 54, 36, .1); border-top: 6px solid var(--butter-2); }
.toc li + li { border-top: 1.5px dashed var(--line); }
.toc a { display: flex; align-items: center; gap: 12px; min-height: 52px; color: var(--ink); text-decoration: none; font-size: 17px; }
.toc a::after { content: '→'; margin-left: auto; color: var(--brown); transition: transform .2s ease; }
.toc a:hover::after { transform: translateX(4px); }
.toc-n { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--butter); color: var(--deep); font-size: 24px; line-height: 1; }

/* ── ② 일반사진관 ───────────────────────── */
.frames { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; margin-top: 40px; }
.frame { position: relative; background: #fff; padding: 9px 9px 0; box-shadow: 0 2px 3px rgba(78, 54, 36, .08), 0 12px 24px rgba(78, 54, 36, .14); }
.frame p { text-align: center; font-size: 25px; padding: 8px 2px 10px; color: var(--ink); }
.f1 { transform: rotate(-2.5deg); }
.f2 { transform: rotate(2deg); margin-top: 14px; }
.f3 { grid-column: 1 / -1; justify-self: center; width: calc(50% - 9px); transform: rotate(-1deg); }
.frame-art { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; background: var(--butter); color: var(--deep); overflow: hidden; }
.frame-art svg { width: 64%; height: auto; }
.art-sky { background: #F6E7C8; }
.art-more { background: repeating-linear-gradient(to bottom, #FFFBEF 0 21px, var(--line) 21px 22px); outline: 2px dashed #D9C08E; outline-offset: -8px; align-content: center; gap: 4px; }
.art-more svg { width: 42%; }
.more-txt { font-size: 14px; line-height: 1.45; text-align: center; color: var(--deep); padding: 0 6px; }

/* ── ③ 이벤트 메모 ──────────────────────── */
.notes { display: grid; gap: 26px; margin-top: 36px; }
.note { position: relative; padding: 30px 24px 26px; background: var(--butter-2); box-shadow: 0 2px 3px rgba(78, 54, 36, .08), 0 14px 22px -6px rgba(78, 54, 36, .22); border-radius: 2px 2px 18px 2px; }
.note p:not(.note-t) { font-size: 17px; line-height: 1.7; }
.note-t { font-size: 30px; color: var(--deep); margin-bottom: 6px; }
.n1 { transform: rotate(-1.4deg); }
.n2 { background: #FFF1B8; transform: rotate(1.2deg); }
.n3 { background: #FBE0C3; transform: rotate(-.8deg); }
.pin { position: absolute; top: -9px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #E9A58B, #B4583A 70%); box-shadow: 0 3px 4px rgba(78, 54, 36, .3); }

/* ── ④ 게임 · 선물 ──────────────────────── */
.cards { display: grid; gap: 30px; margin-top: 36px; }
.card { position: relative; background: #fff; border-radius: 8px; padding: 34px 24px 28px; box-shadow: 0 10px 26px rgba(78, 54, 36, .1); border-bottom: 3px solid var(--line); }
.card-ico { width: 60px; height: 60px; color: var(--deep); margin-bottom: 10px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); }
.card-hand { margin-top: 10px; font-size: 26px; color: var(--brown) !important; }
.small-note { margin-top: 14px; font-size: 15px; line-height: 1.6; padding: 10px 12px; background: var(--butter); border-radius: 6px; color: var(--ink) !important; }

/* ── ⑤ VIP사진관 · 비밀 페이지 ───────────── */
.secret { position: relative; display: grid; gap: 34px; justify-items: center; margin: 36px 16px; padding: 48px 22px 44px; max-width: 1048px;
  background: #4A3222; color: #FFF6DE; border-radius: 18px;
  background-image: radial-gradient(rgba(255, 227, 138, .07) 1px, transparent 1.5px); background-size: 16px 16px; }
@media (min-width: 1112px) { .secret { margin-inline: auto; } }
.secret::after { content: ''; position: absolute; top: 0; right: 0; width: 46px; height: 46px; border-radius: 0 18px 0 8px;
  background: linear-gradient(225deg, var(--paper) 50%, #D9B97A 50%); box-shadow: -3px 3px 6px rgba(0, 0, 0, .18); }
.secret .kicker { color: #F2CB5E; }
.secret .page-no { color: #F2CB5E; opacity: .9; }
.secret p { color: #F4E8CC; }
.mark-dark { background: linear-gradient(transparent 62%, rgba(242, 203, 94, .38) 62% 94%, transparent 94%); }
.secret-copy { max-width: 30em; }
.secret-copy h2 { color: #FFF6DE; margin-bottom: 14px; }

.lockbook { position: relative; width: min(56vw, 210px); }
.cover { position: relative; aspect-ratio: 3 / 4; border-radius: 6px 14px 14px 6px; background: #8A5733;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.5px); background-size: 6px 6px;
  box-shadow: inset 16px 0 0 #6A3F22, inset 18px 0 0 rgba(0, 0, 0, .15), 0 18px 30px rgba(0, 0, 0, .35);
  display: grid; place-content: center; text-align: center; padding-left: 16px; }
.cover::before { content: ''; position: absolute; inset: 12px 12px 12px 28px; border: 2px dashed rgba(242, 203, 94, .55); border-radius: 4px 10px 10px 4px; }
.cover-t { font-size: 38px; color: #FFE9A3 !important; }
.cover-s { font-size: 15px; letter-spacing: .5em; padding-left: .5em; color: #F2CB5E !important; margin-top: 4px; }
.cover-heart { width: 28px; height: 28px; margin: 10px auto 0; }
.strap { position: absolute; top: 50%; right: -10px; width: 34%; height: 46px; margin-top: -23px; background: #5A3A1E; border-radius: 8px 0 0 8px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .3); }
.clasp { position: absolute; left: -22px; top: 50%; width: 44px; height: 52px; margin-top: -30px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }

/* 잘라 내는 선 */
.cutline { display: flex; align-items: center; gap: 12px; max-width: 920px; margin: 8px auto; padding: 0 20px; color: var(--brown); }
.cutline::before, .cutline::after { content: ''; flex: 1; border-top: 2px dashed #D9C08E; }
.cutline .hand { font-size: 23px; text-align: center; }

/* ── ⑥ 답장 보내기 ──────────────────────── */
.reply { padding: 36px 12px 64px; }
.letter { position: relative; max-width: 720px; margin: 0 auto; background: #fff; padding: 32px 12px 26px; text-align: center;
  border: 10px solid transparent; border-image: repeating-linear-gradient(45deg, var(--blue) 0 12px, #fff 12px 22px, #D98F5B 22px 34px, #fff 34px 44px) 10;
  box-shadow: 0 16px 36px rgba(78, 54, 36, .14); }
.letter-to { font-size: 28px; color: var(--brown); text-align: left; }
.letter h2 { font-size: clamp(30px, 8vw, 42px); margin: 8px 0 12px; }
.letter > p:not(.hand) { color: var(--ink-2); max-width: 30em; margin: 0 auto; }
.cta-center { margin-left: auto; margin-right: auto; }
.letter-from { font-size: 24px; color: var(--brown); text-align: right; margin-top: 26px; }

/* ── 꼬리말 ─────────────────────────────── */
.foot { max-width: 1160px; margin: 0 auto; padding: 36px 20px 40px; text-align: center; color: var(--ink); }
.foot-logo { font-family: 'Nanum Pen Script', cursive; font-size: 30px; line-height: 1.2; color: var(--deep); }
.foot-notice { font-size: 15px; margin-top: 6px; }
.foot-copy { font-size: 14px; margin-top: 4px; color: var(--ink-2); }

/* ── 태블릿 ─────────────────────────────── */
@media (min-width: 600px) {
  section { padding-left: 36px; padding-right: 36px; }
  .notes { grid-template-columns: repeat(2, 1fr); }
  .n3 { grid-column: 1 / -1; max-width: 60%; justify-self: center; }
  .cards { grid-template-columns: 1fr 1fr; }
  .frames { grid-template-columns: repeat(3, 1fr); }
  .f3 { grid-column: auto; width: auto; justify-self: stretch; margin-top: -6px; }
  .cta { flex-direction: row; flex-wrap: wrap; max-width: none; }
  .cta > * { width: auto; }
}

/* ── PC ─────────────────────────────────── */
@media (min-width: 900px) {
  body { font-size: 17px; }
  .top-in { padding: 18px 40px 12px; }
  .top-tag { display: none; }
  .top-nav { display: flex; gap: 4px; }
  .top-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 16px; }
  .top-nav a:hover { background: var(--butter); }
  main { margin-bottom: 0; border-radius: 4px 4px 0 0; }

  section { padding: 68px 56px; }
  .hero { grid-template-columns: 1fr 400px; grid-template-areas: "head pol" "body pol"; column-gap: 72px; align-items: end; padding-top: 88px; padding-bottom: 64px; }
  .hero-head { align-self: end; }
  .hero-body { align-self: start; }
  .hero-pol { width: 400px; grid-row: 1 / 3; align-self: center; margin: 0; transform: rotate(2.5deg); }
  .hello { font-size: 36px; }
  :root { --banner-max: 780px; }
  .lead { font-size: 19px; margin-top: 18px; }
  .mood { display: inline-flex; }

  .entry { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto 1fr; column-gap: 56px; align-items: start; }
  .entry .page-no, .entry h2 { grid-column: 1; }
  .entry .lined { grid-column: 1; }
  .entry .toc { grid-column: 2; grid-row: 1 / 4; margin-top: 30px; transform: rotate(1deg); }

  .album { display: grid; grid-template-columns: 360px 1fr; column-gap: 56px; align-items: center; }
  .frames { margin-top: 0; gap: 22px; }
  .f2 { margin-top: 36px; }
  .f3 { margin-top: -10px; }

  .notes { grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 44px; }
  .n3 { grid-column: auto; max-width: none; }
  .n2 { margin-top: 22px; }
  .cards { gap: 40px; margin-top: 44px; }
  .card { padding: 40px 36px 34px; }

  .secret { grid-template-columns: 300px 1fr; gap: 72px; justify-items: stretch; align-items: center; padding: 72px 80px; margin-top: 56px; margin-bottom: 56px; }
  .lockbook { width: 280px; justify-self: center; }

  .reply { padding-top: 48px; padding-bottom: 96px; }
  .letter { padding: 52px 56px 40px; }
  .cta-center { justify-content: center; }
  .foot { padding-bottom: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .tg-btn:hover { transform: none; }
}

/* 텔레그램이 주 버튼 — 인사·답장 칸 (브라운) */
.tg-btn.tg-main { background: var(--deep); color: var(--paper); box-shadow: 0 4px 0 #E2BE70; min-height: 58px; padding: 14px 28px; }
.tg-btn.tg-main .tg-label { font-size: 18px; }
.first-note { margin-top: 18px; max-width: 30em; font-size: 16px; line-height: 1.65; color: var(--ink-2); padding-left: 14px; border-left: 3px solid var(--butter-2); }
.first-note .hand { font-size: 25px; color: var(--deep); margin-right: 4px; }
.letter .cta-center { justify-content: center; }
@media (min-width: 600px) { .cta-center { max-width: none; } }
