/* 색·간격·대비를 한 곳에.
   본문 대비 4.5:1 이상을 지킨다. 글자 크기는 rem 이라 브라우저 설정을 따른다 —
   큰 글씨를 쓰는 사람이 적지 않고, px 로 박으면 그 설정이 무시된다. */
:root {
  --bg:#fbfaf8; --surface:#fff; --sunken:#f1efea; --line:#dcd7cd; --line-strong:#bdb5a5;
  --fg:#1b1a17; --muted:#5a564d; --accent:#1f5f4b; --accent-fg:#fff;
  --accent-soft:#e4f0ea; --hi:#e2a048;
  --warn:#8a4b12; --warn-soft:#fbeee0; --ok:#1b6b43; --ok-soft:#e3f3ea;
  --info:#1f5f7a; --info-soft:#e4eef5;
  --stay:#5b4b8a; --move:#1f5f7a; --eat:#8a4b12; --see:#1f5f4b; --etc:#5a564d;
  --b:"Pretendard","IBM Plex Sans KR","Malgun Gothic",system-ui,sans-serif;
  --m:ui-monospace,Consolas,monospace;
  --r:12px;
  color-scheme: light;
}
/* 어두운 테마는 사용자가 ☀/🌙 버튼으로 골랐을 때만. 기본은 밝은 카드형이다(설계 1.3 "따뜻한 카드형").
   data-theme 가 없는 첫 순간에는 기기 설정을 따르고, app.js 가 바로 저장된 값(기본 light)을 넣는다. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#15161a; --surface:#1d1f24; --sunken:#181a1e; --line:#343841; --line-strong:#4a515e;
    --fg:#eceef2; --muted:#a6acb8; --accent:#5fcfa8; --accent-fg:#10231c;
    --accent-soft:#1d3a30; --hi:#e0a360;
    --warn:#e0a360; --warn-soft:#3a2a14; --ok:#63c893; --ok-soft:#163626;
    --info:#79c3e0; --info-soft:#17303a;
    --stay:#a99ae0; --move:#79c3e0; --eat:#e0a360; --see:#5fcfa8; --etc:#a6acb8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:#15161a; --surface:#1d1f24; --sunken:#181a1e; --line:#343841;
  --fg:#eceef2; --muted:#a6acb8; --accent:#5fcfa8; --accent-fg:#10231c;
  --accent-soft:#1d3a30; --hi:#e0a360;
  --warn:#e0a360; --warn-soft:#3a2a14; --ok:#63c893; --ok-soft:#163626;
  --info:#79c3e0; --info-soft:#17303a;
  --stay:#a99ae0; --move:#79c3e0; --eat:#e0a360; --see:#5fcfa8; --etc:#a6acb8;
  color-scheme: dark;
}

[hidden] { display: none !important }   /* display:flex 같은 규칙이 hidden 을 이기지 않게 */

* { box-sizing: border-box }
html { font-size: 100% }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--b); font-size: 1rem; line-height: 1.55;
  padding-bottom: 12rem;                 /* 채팅 시트 자리. app.js 가 실제 높이로 다시 잡는다 */
}
/* 글이 놓이는 폭. 떠 있는 단추도 이 폭을 기준으로 서므로 **한 곳에서**
   정한다 — 둘이 따로 적혀 있으면 한쪽만 고치는 일이 생긴다. */
:root { --wrap: 44rem }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: .9rem 1rem 2rem }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-fg);
        padding: .6rem 1rem; border-radius: 0 0 var(--r) 0; z-index: 10 }
.skip:focus { left: 0 }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }

/* ── 머리말 ── */
.top { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: baseline; justify-content: space-between; margin-bottom: .6rem }
h1 { font-size: 1.05rem; margin: 0; font-weight: 700; letter-spacing: -.01em }
h1 .sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; margin-top: .1rem }
h2, .h2 { font-size: 1rem; margin: 1rem 0 .5rem; font-weight: 700 }
/* 줄이 바뀌어도 **오른쪽에 남는다.** margin-left:auto 가 없으면 줄바꿈된
   순간 왼쪽으로 떨어져 제목 밑에 끼어든다(실제로 그랬다). */
.headright { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; margin-left: auto }
.headright > .row { flex-wrap: wrap; justify-content: flex-end }
.themebtn { background: transparent; border: 1px solid var(--line); border-radius: 999px; min-height: 0; padding: .15rem .55rem; font-size: .85rem }

/* 일정에 쓸 말. 테마 단추와 같은 키로 맞춘다 — 둘 다 '화면을 어떻게 볼까' 다. */
.langsel {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  min-height: 0; padding: .15rem 1.4rem .15rem .55rem; font-size: .8rem;
  color: var(--muted); width: auto; cursor: pointer;
}
.langsel:hover { color: var(--fg) }

/* 목록으로 돌아가는 길. 그림 대신 글자로 둔다 — 집 모양은 '홈' 으로도
   '숙소' 로도 읽혀서, 숙소가 잔뜩 나오는 화면에서는 헷갈린다. */
.btn.back {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: .25rem .7rem; font-size: .82rem; font-weight: 600;
  white-space: nowrap; text-decoration: none;
}
.btn.back:hover { color: var(--fg); border-color: var(--muted) }

/* 관리자만 보는 자리. 맨 아래에 조용히 둔다 — 쓰는 사람에게는 쓸 일이 없는
   단추라, 눈에 먼저 띄면 "내가 눌러도 되나" 를 매번 묻게 된다. */
.adminlink { margin-top: 1.4rem }
.adminlink:empty { display: none }
.adminlink a {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem; font-size: .8rem; color: var(--muted);
  text-decoration: none; background: var(--surface);
}
.adminlink a:hover { color: var(--fg); border-color: var(--muted) }

/* ── 알아두실 것 ──────────────────────────────────────
   전에는 다섯 문단이 쭉 깔려 있었다. 아무도 안 읽는다 — 길면 '약관' 으로
   보이고 눈이 건너뛴다. **손해를 볼 수 있는 한 줄만** 밖에 두고 나머지는
   접는다. 접어 둔 것은 숨긴 것이 아니라 찾으면 있는 것이다. */
.guide { margin: .5rem 0 0; font-size: .82rem; color: var(--muted) }
.guide > summary { cursor: pointer; list-style: none; padding: .2rem 0 }
.guide > summary::-webkit-details-marker { display: none }
.guide > summary::before { content: "▸"; display: inline-block; font-size: .8em; margin-right: .3rem; transition: transform .15s ease }
.guide[open] > summary::before { transform: rotate(90deg) }
.guide > summary:hover { color: var(--fg) }
.guide ul { margin: .2rem 0 0; padding-left: 1.1rem; line-height: 1.7 }

/* ── 일정 짜기 물어보기 ────────────────────────────────
   바로 짜지 않고 묻는 까닭: 날짜별로 하나씩 부르느라 몇십 초가 걸린다.
   조건을 더 적으려던 사람의 말을 가로채면 그 시간을 통째로 버린다. */
.setupask {
  margin: 0 0 .7rem; padding: .8rem .9rem;
  border: 1px solid var(--accent); border-radius: var(--r);
  background: var(--surface);
}
.setupask[hidden] { display: none }
.setupask .l { font-weight: 700; font-size: .95rem }
.setupask .st { margin: .25rem 0 .6rem; font-size: .8rem; color: var(--muted) }

/* 짜는 동안 잠긴 조건 칸 — 왜 안 눌리는지 보이게 한다. */
#headerForm.locked { opacity: .5; pointer-events: none }
@media (prefers-reduced-motion: reduce) { .guide > summary::before { transition: none } }

/* ── 로그인 ────────────────────────────────────────────
   구글 단추는 구글이 그린다(상표 규칙). 우리가 하는 일은 자리를 내주고,
   들어온 뒤에 이름과 로그아웃을 같은 키로 세우는 것뿐이다. */
.loginbox { display: inline-flex; align-items: center; gap: .35rem }
.loginbox .gbtn { display: inline-flex; align-items: center; min-height: 1.9rem }
.loginbox .who {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .82rem; color: var(--muted); max-width: 9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.loginbox .face { width: 1.3rem; height: 1.3rem; border-radius: 999px; flex: none }

/* 고칠 수 있는 자리라는 표시. 평소엔 흐리고 손이 가면 또렷해진다 —
   늘 또렷하면 제목보다 연필이 먼저 보인다. */
.overview .head .title .pen {
  font-size: .7em; margin-left: .4rem; opacity: .35; vertical-align: middle;
  transition: opacity .15s ease;
}
.overview .head:hover .title .pen, .overview .head:focus-within .title .pen { opacity: .85 }
@media (prefers-reduced-motion: reduce) { .overview .head .title .pen { transition: none } }

/* 공유 상자는 머리말 안, 누른 단추 바로 아래 줄을 통째로 쓴다.
   ⚠️ 비어 있을 땐 **없는 셈**이어야 한다. 빈 채로 100% 를 먹으면 거기서
      줄이 끊겨 언어·테마 단추가 아래로 밀렸다. */
#shareHere { flex-basis: 100%; }
#shareHere:empty { display: none; flex-basis: auto }

/* ── 공유 링크 상자 ────────────────────────────────────
   링크를 **보여 주고** 복사한다. 복사만 하면 됐는지 모르고, 보여 주기만
   하면 긴 주소를 손으로 옮겨야 한다. 머리말 아래에 붙어 나온다. */
.sharebox {
  margin: .5rem 0 0; padding: .6rem .7rem; width: 100%;
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r);
  display: flex; flex-direction: column; gap: .4rem;
}
.sharebox .l { font-size: .85rem; font-weight: 600 }
.sharebox .link { width: 100%; font-family: var(--m); font-size: .78rem }
.sharebox .row { gap: .35rem }
.sharebox .st { margin: 0; font-size: .74rem; color: var(--muted) }

/* 작은 화면에서는 첫 화면 단추의 글자를 접고 집 모양만 남긴다. */
@media (max-width: 30rem) { .hidesm { display: none } }
a.btn.get { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600 }
.apkmeta { font-size: .72rem; font-weight: 400; opacity: .85; margin-left: .15rem }

/* ── 입력 ── */
label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .25rem }
input, select, textarea, button {
  font-family: inherit; font-size: 1rem; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem;
}
input, select, textarea { width: 100% }
button { width: auto; cursor: pointer; background: var(--sunken); font-weight: 500 }
button:hover { border-color: var(--muted) }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600 }
button.sm { font-size: .85rem; padding: .3rem .55rem }
button[disabled] { opacity: .5; cursor: default }
button, a.btn { min-height: 2.25rem }
button.back { background: transparent; border: 0; color: var(--accent); font-weight: 700; padding-left: 0 }
a { color: var(--accent); text-underline-offset: .15em }
a.btn { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; background: var(--sunken);
        border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; font-size: .85rem; color: var(--fg) }
a.btn:hover { border-color: var(--muted) }

/* ── 상자 ── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: .9rem }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center }
.row.end { justify-content: flex-end }
.grow { flex: 1 }
.grid { display: grid; gap: .75rem }
.grid.two { grid-template-columns: 1fr 1fr }
@media (max-width: 30rem) { .grid.two { grid-template-columns: 1fr } }
.note { font-size: .85rem; color: var(--muted) }
.note.warn { color: var(--warn) }
.muted { color: var(--muted) }
.ok { color: var(--ok) } .warn { color: var(--warn) }
.empty { color: var(--muted); text-align: center; padding: 1.4rem 0; font-size: .92rem }
.say { min-height: 1.4rem; font-size: .85rem; color: var(--muted) }
.say.ok { color: var(--ok) } .say.bad { color: var(--warn) }

/* ── 알약 ── */
.pill { display: inline-block; font-size: .74rem; font-weight: 600; border-radius: 999px; padding: .15rem .55rem;
        background: var(--sunken); color: var(--fg); text-decoration: none; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.pill.accent { background: var(--accent); color: var(--accent-fg) }
.pill.ok { background: var(--ok-soft); color: var(--ok) }
.pill.info { background: var(--info-soft); color: var(--info) }
.pill.warn { background: var(--warn-soft); color: var(--warn) }
.pill.ghost { background: var(--sunken); color: var(--muted) }

/* ── 한눈에 보기 ──
   누를 수 있는 네모(.card)는 button 이다. 키보드로도 열리고, 눌렀다는 것이 분명하다. */
.overview { display: flex; flex-direction: column; gap: .6rem }
.card { display: block; width: 100%; text-align: left; background: var(--surface); border: 2px solid transparent;
        box-shadow: 0 1px 3px rgba(0,0,0,.06); border-radius: var(--r); padding: .8rem .9rem;
        position: relative; font: inherit; color: inherit; line-height: 1.45 }
.card:hover { border-color: var(--line) }
.card.hi { border-color: var(--hi) }
.card .justnow { position: absolute; top: -.6rem; right: .8rem; background: var(--hi); color: #fff;
                 font-size: .66rem; font-weight: 700; border-radius: 999px; padding: .1rem .5rem }
.card .label { font-size: .76rem; color: var(--muted); font-weight: 600; margin-bottom: .2rem }
.card .v { font-size: .95rem; font-weight: 700 }
.card .st { font-size: .76rem; color: var(--muted); margin-top: .15rem }

.card.head { padding: .9rem 1rem }
.card.head .title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em }
.card.head .sub { font-size: .85rem; color: var(--muted); margin-top: .15rem }
.card.head .acts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem }
.card.head .hleft { min-width: 0 }
.card.head .hright { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; flex: none }
.companion { text-align: right; background: var(--sunken); border-radius: 10px; padding: .35rem .65rem; min-width: 6rem }
.companion .cnum { font-size: .95rem; font-weight: 700; white-space: nowrap }
.companion .crel { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 10rem }
.act { display: inline-block; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px;
       padding: .25rem .6rem; background: var(--sunken); cursor: pointer }
.act:hover { border-color: var(--muted) }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem }
.card.tile { min-height: 5.6rem; padding: .6rem .7rem }
.card.tile .v { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }

/* 전체 일정 제목 줄 + 준비 요약 */
.sechead { display: flex; align-items: baseline; gap: .3rem; margin-top: .6rem; cursor: pointer; border-radius: 8px }
.sechead .h2 { margin: 0 }
.sechead .muted { font-size: .78rem }
.prepsum { font-size: .8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
           padding: .25rem .7rem; width: fit-content; max-width: 100%; cursor: pointer; margin-bottom: .1rem }

/* Day 카드: 사진 | 일정 | 할 일(오른쪽). 좁은 화면에선 할 일이 아래로 내려간다 */
.card.daycard { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) minmax(8.5rem, 11rem); gap: 0 .7rem; padding: 0; overflow: hidden }
.card.daycard.notodos { grid-template-columns: 6.2rem minmax(0, 1fr) }   /* 준비할 게 없으면 칸 자체를 두지 않는다 */
.daycard .todos { padding: .6rem .8rem .6rem 0; border-left: 1px dashed var(--line); padding-left: .7rem; min-width: 0 }
.daycard .todos .label { margin-bottom: .15rem }
.daycard .todos .label { font-size: .68rem }
.daycard .todos .check { font-size: .72rem; padding: .05rem 0; gap: .3rem; align-items: center; line-height: 1.3 }
.daycard .todos .check input { width: .85rem; height: .85rem }
.daycard .todos .check span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }   /* 한 줄, 넘치면 … */
.daycard .todos .st { font-size: .72rem }
@media (max-width: 36rem) {
  .card.daycard { grid-template-columns: 6.2rem minmax(0, 1fr) }
  .daycard .todos { grid-column: 1 / -1; border-left: 0; border-top: 1px dashed var(--line); padding: .5rem .8rem .6rem }
}
.todosbox .st { font-size: .82rem; color: var(--muted) }
.daycard .photo { width: 6.2rem; flex: none; background: var(--sunken); position: relative; min-height: 7rem; display: flex; align-items: center; justify-content: center; font-size: 2rem }
.daycard .photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0 }
.daycard .photo.noimg { background: linear-gradient(135deg, #ffe0bf, #bcd7ff) }
.daycard .credit { position: absolute; left: 0; right: 0; bottom: 0; font-size: .55rem; color: #fff; background: rgba(0,0,0,.4); padding: .05rem .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.daycard .body { padding: .6rem .7rem .6rem 0; min-width: 0 }
.daycard .dayhd { font-size: .76rem; color: var(--muted) }
.daycard .dayhd b { color: var(--accent) }
.daycard .daytitle { font-size: .98rem; font-weight: 700; margin: .05rem 0 .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.daycard .lines { list-style: none; margin: 0; padding: 0; font-size: .85rem }
.daycard .lines li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5 }
.daycard .lines .time { color: var(--muted); font-family: var(--m); font-size: .78rem }
.daycard .warnline { font-size: .76rem; color: var(--warn); margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem }
.card.half { padding: .7rem .8rem }
.check { display: flex; align-items: center; gap: .45rem; font-size: .84rem; padding: .12rem 0; cursor: pointer }
.check input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent) }
.check .done { color: var(--muted); text-decoration: line-through }
.checkrow { display: flex; align-items: center; gap: .4rem; padding: .2rem 0 }
.checkrow .check { flex: 1 }

/* ── 블록 상세 ── */
.detail .dtitle { font-size: 1.15rem; margin: .2rem 0 .5rem }
.detail img.hero { width: 100%; height: 10rem; object-fit: cover; border-radius: var(--r); margin-bottom: .6rem }
.detail .rowitem { padding: .7rem .9rem; margin-bottom: .5rem }
.detail .rowitem .v { font-size: 1rem; font-weight: 700 }
.detail .rowitem button { margin-top: .4rem }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .7rem }
.chips:empty, .chips[hidden] { display: none }
.chip { font-size: .8rem; font-weight: 600; border-radius: 999px; padding: .3rem .7rem; background: var(--accent-soft);
        border: 1px solid transparent; color: var(--accent); white-space: nowrap; min-height: 0 }
.chip:hover { border-color: var(--accent) }
.chip.ghost { background: var(--sunken); color: var(--muted) }

/* ── Day 편집기 ── */
/* 위에 색 띠를 둘러 **장이 바뀌는 느낌**을 준다. 모든 날을 한 번에 펴면
   상자 테두리만으로는 어디서 하루가 끝나는지 안 보인다. */
.day {
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--r); background: var(--surface);
  padding: .85rem 1rem; margin-bottom: 1.3rem;
}
.day > header { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .6rem }
/* 날이 바뀌는 자리를 알리는 **표지**다. 회색 작은 글씨로 두었더니 모든 날을
   한 번에 펴 놓고 볼 때 어디서 하루가 끝나는지 안 보였다. */
.day .num {
  font-family: var(--b); font-size: .8rem; font-weight: 700; letter-spacing: .01em;
  color: var(--accent-fg); background: var(--accent);
  border-radius: 999px; padding: .25rem .75rem; flex: none;
}
.day .daytitle { flex: 1; min-width: 8rem; font-weight: 600 }
/* 줄 사이 선은 **진한 쪽**을 쓴다. --line 은 상자 테두리용이라 줄 사이에
   쓰면 거의 안 보이고, 그러면 어디서 한 줄이 끝나는지 눈으로 못 가른다. */
.item { border-top: 1px solid var(--line-strong); padding: .6rem .4rem; margin: 0 -.4rem; border-radius: 8px; cursor: pointer }
.item:first-child { border-top: 0 }
.item.on { background: var(--accent-soft); border-top-color: transparent }
/* ⚠️ grid 로 칸을 못 박아 두면 안 된다. 손잡이(⠿)와 자물쇠를 줄에 더한 순간
   칸 수가 넘쳐 **입력칸마다 한 줄씩 쌓였다** — 폰에서 상세가 여섯 줄이 됐다.
   flex 로 두면 무엇을 더해도 한 줄에 들어가고, 좁으면 장소칸만 줄어든다. */
.item .line1 { display: flex; gap: .3rem; align-items: center; flex-wrap: nowrap }
.item .line1 > .grip, .item .line1 > .lockbtn, .item .line1 > .sm { flex: none }
.item .line1 > input.time { width: 4.2rem; flex: none; padding: .4rem .2rem }
.item .line1 > input.place { flex: 1; min-width: 0 }
.item .line1 > select.kind { width: 4.6rem; flex: none; padding: .4rem .2rem; font-size: .85rem }
.item .line2 { display: flex; gap: .4rem; align-items: center; margin-top: .35rem }
.item .line3 { display: flex; gap: .4rem; align-items: center; margin-top: .35rem }
.item .line3 input.link { font-size: .85rem; padding: .4rem .6rem }
.item .line3 a.btn { flex: none }
/* 좁은 화면에서는 **장소를 제 줄로 내린다.**
   한 줄에 손잡이·확정·시각·장소·종류·수단·빼기를 다 세우면, 늘어날 수
   있는 칸이 장소뿐이라 장소만 짜부라진다. 390px 에서 14px 까지 줄어
   "新宿 (신…" 으로 잘렸다. 나머지는 폭이 정해져 있어 양보할 줄 모른다.

   ⚠️ 앞서 적혀 있던 grid-template-columns 는 아무 일도 하지 않았다 —
      .line1 은 flex 라 grid 속성이 무시된다. 지우고 flex 로 고친다. */
@media (max-width: 40rem) {
  .item .line1 { flex-wrap: wrap; row-gap: .35rem }
  /* 장소와 빼기가 **같은 줄**에 내려온다. 빼기를 첫 줄에 남기려 했더니
     자리가 모자라 혼자 한 줄을 차지했다 — 줄 하나를 ✕ 한 개가 먹는 꼴이다. */
  .item .line1 > input.place { order: 9; flex: 1 1 60%; min-width: 0 }
  .item .line1 > input.time { width: 3.9rem }
  .item .line1 > select.kind { width: 4.2rem }
  .item .line1 > select.movekind { width: 4.6rem }
  .item .line1 > .sm.x { order: 10; flex: none }

  /* 링크 칸이 최소폭 때문에 상자를 비집고 나갔다. 좁은 화면에서는 제 줄로. */
  .linkfold .line3 { flex-wrap: wrap }
  .linkfold .line3 > input.link { flex: 1 0 100%; min-width: 0 }
  .item .line3 input.link { min-width: 0 }
}
.item input.time { font-family: var(--m); text-align: center }
.iteminfo { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem }
.aff { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem }
.aff a { font-size: .8rem; padding: .25rem .5rem }
.aff .mark { font-size: .72rem; color: var(--muted); align-self: center }

/* ── 예약 기록 ── */
.booking { margin-top: .35rem }
.booking .book-add { font-size: .8rem }
.book-sum { display: block; width: 100%; text-align: left; font-size: .82rem; padding: .35rem .6rem;
            background: var(--sunken); border: 1px solid var(--ok); border-radius: 8px; color: var(--fg) }
.book-sum::before { content: "✓ "; color: var(--ok); font-weight: 700 }
.book { margin-top: .4rem; padding: .7rem; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px }
.book-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)) }
.book-grid label { font-size: .78rem }
.book-grid input { font-size: .9rem; padding: .4rem .5rem }
.book .row { margin-top: .5rem }
.item:has(.booking[data-booked="1"]) .place { font-weight: 600 }

/* ── 보관함 ── */
details.archive > summary { cursor: pointer; font-weight: 600; font-size: .95rem }
.trips { display: flex; flex-direction: column; gap: .4rem }
.trip { display: flex; gap: .5rem; align-items: center; width: 100%; text-align: left; background: var(--surface);
        border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; font-size: .9rem }
.trip[aria-current="true"] { border-color: var(--accent); background: var(--sunken) }
.trip .when { font-family: var(--m); font-size: .75rem; color: var(--muted) }

/* ── 채팅 시트 ──
   화면 아래에 붙어 있고, 손잡이를 끌면 커진다. 접힌 상태에서도 입력해 보낼 수 있다. */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-direction: column;
         background: var(--surface); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
         box-shadow: 0 -4px 18px rgba(0,0,0,.10); padding: 0 .8rem calc(.6rem + env(safe-area-inset-bottom, 0px));
         max-height: 92vh; margin: 0 auto; max-width: 44rem }
.sheet[hidden] { display: none }
/* position:relative 를 주면 안 된다 — 위의 position:fixed 를 덮어써서 시트가
   화면 아래가 아니라 **문서 끝**에 붙는다. fixed 도 절대 위치의 기준이 되므로
   relative 는 필요 없다. */
.sheet .handle { display: flex; flex-direction: column; align-items: center; padding: .55rem 0 .3rem; cursor: ns-resize;
                 user-select: none; touch-action: none }
.sheet .handle .bar { width: 2.6rem; height: 5px; border-radius: 3px; background: var(--line) }
.sheet .handle .hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.sheet.open .handle .hint { display: none }
.focusbar { display: flex; align-items: center; gap: .6rem; background: var(--accent-soft); color: var(--accent);
            border-radius: 999px; padding: .25rem .4rem .25rem .8rem; font-size: .8rem; font-weight: 700; margin: .1rem auto .3rem; width: fit-content; max-width: 100% }
.focusbar button { min-height: 0; padding: .1rem .5rem; font-size: .75rem }
.chat { display: none; flex-direction: column; gap: .5rem; overflow-y: auto; padding: .2rem .1rem; flex: 1; min-height: 0 }
.sheet.open .chat { display: flex }
.turn { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem }
.turn.me { align-items: flex-end }
.turn .tag { font-size: .68rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .05rem .5rem }
.bubble { max-width: 90%; padding: .5rem .8rem; border-radius: 14px; font-size: .92rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word }
.turn.me .bubble { background: var(--accent); color: var(--accent-fg); border-bottom-right-radius: 4px }
.turn.ai .bubble { background: var(--sunken); border: 1px solid var(--line); border-bottom-left-radius: 4px }
.turn.sys .bubble { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: .85rem; max-width: 100% }
.bubble .meta { display: block; margin-top: .3rem; font-size: .7rem; color: var(--muted) }
.turn.me .bubble .meta { color: rgba(255,255,255,.75) }
.dots span { display: inline-block; width: .35rem; height: .35rem; margin-right: .2rem; background: var(--muted); border-radius: 50%; animation: blink 1.2s infinite }
.dots span:nth-child(2) { animation-delay: .2s }
.dots span:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%,60%,100% { opacity: .25 } 30% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .dots { display: none } * { animation: none !important; transition: none !important } }
.picker { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem }
.picker select { flex: 1; min-width: 10rem; font-size: .9rem; padding: .4rem .5rem }
.sheet .chips { margin: .3rem 0 .4rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none }
.sheet .chips::-webkit-scrollbar { display: none }
/* 사진 첨부 */
.attachbtn { width: 2.6rem; height: 2.6rem; border-radius: 50%; padding: 0; font-size: 1.1rem; flex: none; background: var(--sunken) }
.attachstrip { display: flex; gap: .4rem; padding: .2rem 0 .3rem; overflow-x: auto }
.attach { position: relative; flex: none }
.attach img { width: 3.6rem; height: 3.6rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block }
.attach .x { position: absolute; top: -.35rem; right: -.35rem; min-height: 0; padding: 0 .3rem; font-size: .7rem; border-radius: 999px; background: var(--surface) }
.bubble .thumb { display: block; max-width: 12rem; max-height: 9rem; border-radius: 8px; margin-top: .35rem }
.chatbar { display: flex; gap: .5rem; align-items: flex-end }
.chatbar textarea { flex: 1; min-height: 2.6rem; max-height: 7.5rem; resize: none; font-size: 1rem; border-radius: 18px; padding: .6rem .9rem; background: var(--sunken) }
.chatbar button { width: 2.6rem; height: 2.6rem; border-radius: 50%; padding: 0; font-size: 1.2rem; font-weight: 800; flex: none }

/* ── 지도 ── */
#map { height: 60vh; min-height: 20rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken) }
.leaflet-container { font-family: var(--b) }
.leaflet-popup-content { font-size: .9rem; line-height: 1.5 }
.pin { display: flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
       color: #fff; font-size: .78rem; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.4) }
.mapnote { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 8px;
           padding: .7rem 1rem; margin-bottom: .7rem; font-size: .85rem; color: var(--muted) }
.pinlabel { position: absolute; left: 1.9rem; top: .1rem; white-space: nowrap; font-size: .72rem; font-weight: 600; color: var(--fg);
            background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: .05rem .3rem; pointer-events: none }
.pop { min-width: 13rem }
.pophead { font-weight: 700; font-size: .9rem; margin-bottom: .15rem }
.popsub { font-size: .78rem; color: var(--muted) }
.poprow { display: flex; gap: .3rem; align-items: center; margin-top: .45rem }
.pop a.btn.sm { padding: .2rem .45rem; font-size: .78rem }
:root[data-theme="dark"] .leaflet-tile-pane, .darkmap .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.5) }
.darkmap .leaflet-control-attribution { background: rgba(24,33,31,.85); color: var(--muted) }
.darkmap .leaflet-control-attribution a { color: var(--accent) }
.nolabel .pinlabel { display: none }


/* ── 숙소 ──
   일정 줄 안에 들어간다. 종류가 '숙소' 일 때만 보이고, 고른 뒤에만 카드가 펼쳐진다. */
.stay { margin-top: .4rem }
.stay[hidden] { display: none !important }

.stay-card {
  display: grid; grid-template-columns: 5rem 1fr auto; gap: .7rem; align-items: start;
  padding: .6rem; background: var(--sunken);
  border: 1px solid var(--line); border-left: 3px solid var(--stay); border-radius: 8px;
}
.stay-card img { width: 5rem; height: 3.6rem; object-fit: cover; border-radius: 6px;
                 background: var(--line) }
.stay-info { min-width: 0 }
.stay-info strong { display: block; font-size: .92rem; overflow-wrap: anywhere }
.stay-meta { display: block; font-size: .78rem; color: var(--muted); margin-top: .15rem }
.stay-tools { display: flex; flex-direction: column; gap: .3rem }
.stay-tools .sm { font-size: .76rem; white-space: nowrap }

/* 출처 뱃지. 아주 작게 — 밝히되 읽기를 방해하지 않는다. */
.src {
  display: inline-block; font-size: .68rem; line-height: 1.5;
  padding: 0 .3rem; border: 1px solid var(--line); border-radius: 4px;
  color: var(--muted); vertical-align: 1px; white-space: nowrap;
}

/* 연동현황 */
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0 0; justify-content: flex-end }
.chip { font-size: .72rem; padding: .1rem .45rem; border-radius: 999px;
        border: 1px solid var(--line); color: var(--muted) }
.chip.on { border-color: var(--ok); color: var(--ok) }
.chip.on::before { content: "● " }
.chip.off::before { content: "○ " }

.stay-panel { margin-top: .5rem; padding: .7rem; background: var(--sunken);
              border: 1px solid var(--line); border-radius: 8px }
.stay-find { display: flex; flex-wrap: wrap; gap: .4rem }
.stay-find .stay-where { flex: 1; min-width: 9rem }
.stay-count { font-size: .8rem; color: var(--muted); margin: .6rem 0 .4rem }

.stay-results { display: grid; gap: .4rem }
.stay-opt {
  display: grid; grid-template-columns: 4rem 1fr; gap: .6rem; align-items: center;
  width: 100%; text-align: left; padding: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  color: var(--fg); cursor: pointer;
}
.stay-opt:hover, .stay-opt:focus-visible { border-color: var(--stay) }
.stay-opt img { width: 4rem; height: 3rem; object-fit: cover; border-radius: 5px;
                flex: 0 0 auto; background: var(--line) }
.stay-opt-t { min-width: 0 }
.stay-opt-t strong { display: block; font-size: .86rem; overflow-wrap: anywhere }

/* 상세 */
.stay-detail { margin-top: .5rem; padding: .7rem; background: var(--sunken);
               border: 1px solid var(--line); border-radius: 8px }
.stay-photos { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .3rem }
.stay-photos img { width: 7rem; height: 5rem; object-fit: cover; border-radius: 6px;
                   flex: 0 0 auto; background: var(--line) }
.stay-facts { font-size: .8rem; margin: .5rem 0 0; font-weight: 600 }
.stay-fac { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none;
            padding: 0; margin: .45rem 0 0 }
.stay-fac li { font-size: .72rem; color: var(--muted);
               border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem }
.stay-over { font-size: .8rem; color: var(--muted); margin: .5rem 0 0; line-height: 1.6 }
.stay-imp { font-size: .76rem; color: var(--warn); margin: .45rem 0 0 }

/* hidden 속성은 display 를 지정한 규칙에 밀린다. 한 번 못박아 둔다. */
[hidden] { display: none !important }

@media (max-width: 30rem) {
  .stay-card { grid-template-columns: 3.5rem 1fr }
  .stay-card img { width: 3.5rem; height: 2.6rem }
  .stay-tools { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap }
}


/* 채팅 안의 숙소 선택지 */
.chat-stays { margin-top: .5rem; display: grid; gap: .35rem }
.chat-stays-h { font-size: .74rem; color: var(--muted); margin: 0 0 .1rem }
.chat-stay { border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
             background: var(--surface) }
.chat-stay-main {
  display: grid; grid-template-columns: 3.6rem 1fr; gap: .5rem; align-items: center;
  width: 100%; text-align: left; padding: .35rem; background: none; border: 0;
  color: var(--fg); cursor: pointer;
}
.chat-stay-main:hover, .chat-stay-main:focus-visible { background: var(--sunken) }
.chat-stay-main img { width: 3.6rem; height: 2.7rem; object-fit: cover; border-radius: 5px;
                      background: var(--line) }
.chat-stay-t { min-width: 0 }
.chat-stay-t strong { display: block; font-size: .84rem; overflow-wrap: anywhere }
.chat-stay .aff { padding: 0 .45rem .35rem; margin: 0 }
.chat-stay .aff a { font-size: .74rem }


/* ── 카드의 준비 체크: 좌측 일정 줄과 같은 줄 ──
   같은 <li> 안의 두 칸이라 어긋날 수가 없다. 오른쪽 칸의 점선이 예전의
   세로 구분선 노릇을 한다. */
/* 줄 높이는 **왼쪽 글자가 정한다.** 오른쪽 체크·아이콘이 더 크면 줄이 밀려
   카드가 길쭉해진다 — 그래서 오른쪽 것들은 줄 높이 안에 들어가게 묶어 둔다.
   (min-height 를 주면 그 자체가 줄을 밀어올린다. 주지 않는다.)

   칸 너비는 넉넉히 준다. 좁게 잡으면 이모지가 카드 밖으로 밀려나 잘린다
   (.card 가 overflow:hidden 이라 소리 없이 잘린다 — 3px 만 넘어도 그렇다).
   순서는 **무엇인지 → 했는지 → 하러 가기** 로 읽히게 뒀다. */
.daycard .lines li { display: grid; grid-template-columns: minmax(0, 1fr) 4.3rem;
                     gap: .6rem; align-items: center; line-height: 1.5 }
.daycard .lines li .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }
/* 오른쪽 끝에 가지런히 붙인다. 왼쪽으로 몰아 두면 칸 오른쪽이 휑하게 빈다.
   읽는 순서는 **무엇인지(아이콘) → 했는지(체크) → 하러 가기(＋/🔗)** 다. */
.daycard .lines li .p { border-left: 1px dashed var(--line); padding-left: .5rem;
                        align-self: stretch; display: flex; align-items: center;
                        justify-content: flex-end; gap: .35rem; line-height: 1 }


@media (max-width: 36rem) {
  .daycard .lines li { grid-template-columns: minmax(0, 1fr) 2.8rem; gap: .4rem }
  .daycard .lines li .p { padding-left: .4rem }
}

/* ── 순서 바꾸기 손잡이 ── */
.item .line1 { position: relative }
.grip {
  background: none; border: 0; padding: 0 .25rem 0 0; cursor: grab;
  color: var(--muted); font-size: .95rem; line-height: 1; touch-action: none;
}
.grip:active { cursor: grabbing }
.grip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px }
.item.dragging { opacity: .45 }
.item.over { box-shadow: inset 0 2px 0 var(--accent) }


/* 줄 오른쪽: 링크버튼 + 체크박스 */
/* 전역 button 의 min-height:2.25rem 은 손가락으로 누르라고 둔 것인데, 이 촘촘한
   목록에서는 줄을 36px 로 밀어올려 카드가 길쭉해진다. 높이는 풀되 **누를 영역은
   그대로 둔다** — 가짜 레이어를 띄워 넓히면 레이아웃에는 영향이 없다. */
.plink {
  background: none; border: 0; padding: 0; cursor: pointer; font-size: .78rem;
  color: var(--muted); line-height: 1; flex: none;
  min-height: 0; position: relative; width: 1.05em; text-align: center;
  border-radius: 999px; transition: color .12s ease;
}
.plink:hover { color: var(--accent) }
.plink::after { content: ""; position: absolute; inset: -11px -7px }
.pcheck { position: relative }
.pcheck::after { content: ""; position: absolute; inset: -11px -4px }
.pcheck input, .pcheck .ic { position: relative; z-index: 1 }
.plink.has { color: var(--accent) }
.plink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px }

/* 숙소 고르기 창 */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--surface); border-radius: var(--r); width: min(42rem, 100%);
  max-height: 92dvh; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line);
}
.modal-h { display: flex; align-items: center; justify-content: space-between;
           gap: .5rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line) }
.modal-find { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem .8rem }
.modal-find .stay-where { flex: 0 0 8rem }
.modal-find .stay-want { flex: 1; min-width: 10rem }
/* ⚠️ grid 는 남은 높이에 줄을 **욱여넣는다.** 10개를 짧은 칸에 넣으면 각 줄이
   눌려 사진이 선으로 변하고 평점·주소가 잘린다 — 실제로 그렇게 보였다.
   align-content:start 로 줄을 제 키대로 쌓고, 넘치면 스크롤하게 둔다.
   flex:1·min-height:0 이 없으면 아래 칸에 밀려 목록이 더 납작해진다. */
/* ⚠️ grid 로 두면 안 된다.
   카드에 overflow:hidden 이 있으면 그 카드의 '최소 높이' 가 0 이 되고, grid 는
   남은 높이에 맞추려고 **내용보다 작게 줄여 버린다**. 실제로 105px 짜리 카드가
   47px 로 눌려 사진이 선이 되고 글자가 잘렸다. align-content:start 는 남는 공간이
   있을 때만 듣기 때문에 이걸 막지 못한다.

   flex 세로쌓기로 두고 각 카드에 flex:none 을 주면 줄어들 수가 없다.
   넘치면 그냥 스크롤된다. */
.modal-list { overflow-y: auto; padding: 0 .8rem .6rem;
              display: flex; flex-direction: column; gap: .3rem;
              flex: 1 1 auto; min-height: 0 }
.modal-list > * { flex: none }
.modal-f { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
           padding: .5rem .8rem; border-top: 1px solid var(--line); flex: none }
.modal-f input { flex: 1; min-width: 7rem }
.modal-f .st { flex-basis: 100%; font-size: .74rem; margin: 0 }
.modal-h, .modal-when, .modal-find, .modal-why { flex: none }

/* 좁은 화면에서는 아래에서 올라오는 시트처럼 — 화면을 꽉 써야 목록이 보인다 */
@media (max-width: 34rem) {
  .modal-back { padding: 0; align-items: flex-end }
  .modal { width: 100%; max-height: 94dvh; border-radius: var(--r) var(--r) 0 0;
           border-bottom: 0 }
  .modal-why { max-height: 4.5rem; overflow-y: auto }
}

.pick {
  display: grid; grid-template-columns: 1.4rem 4.4rem 1fr; gap: .5rem; align-items: center;
  width: 100%; text-align: left; padding: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  color: var(--fg); cursor: pointer;
}
.pick:hover, .pick:focus-visible { border-color: var(--stay) }
.pick .rank { font-family: var(--m); font-size: .74rem; color: var(--muted); text-align: center }
.pick img { width: 4.4rem; height: 3.2rem; object-fit: cover; border-radius: 5px;
            background: var(--line) }
.pick-t { min-width: 0 }
.pick-t strong { display: block; font-size: .86rem; overflow-wrap: anywhere }
.pick-t .why { display: block; font-size: .74rem; color: var(--accent) }
.modal-list .aff { margin: 0 0 .35rem 2rem }
.modal-list .aff a { font-size: .72rem }


.modal-when { margin: 0; padding: .45rem .8rem; font-size: .8rem; font-weight: 600;
              background: var(--sunken); border-bottom: 1px solid var(--line) }
.modal-when.warn { color: var(--warn); font-weight: 400 }
/* 대표 사진 하나를 크게 — 날짜와 사진으로 고르게 한다 */
.pick { grid-template-columns: 1.4rem 6.4rem 1fr }
.pick img { width: 6.4rem; height: 4.6rem }
.pick-t .pr { display: block; font-size: .72rem; color: var(--muted); margin-top: .1rem }
@media (max-width: 30rem) {
  .pick { grid-template-columns: 1.2rem 4.6rem 1fr }
  .pick img { width: 4.6rem; height: 3.4rem }
}

.modal-move { padding: .2rem .8rem .6rem }
.modal-move .st { margin: 0 0 .5rem; line-height: 1.6 }
.modal-move .aff { margin: 0 }


/* 고르기 팝업 — 카드 한 장에 '고르기' 와 '관심없음' 을 같이 둔다 */
.modal-why { margin: 0; padding: .5rem .8rem; font-size: .8rem; line-height: 1.6;
             color: var(--fg); background: var(--sunken);
             border-bottom: 1px solid var(--line) }
.pickcard { border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
            background: var(--surface) }
.pickcard .pick { border: 0; border-radius: 0 }
.pickcard:hover, .pickcard:focus-within { border-color: var(--stay) }
.pick-tools { display: flex; align-items: center; justify-content: space-between;
              gap: .4rem; padding: 0 .5rem .4rem; flex-wrap: wrap }
.pick-tools .aff { margin: 0; display: flex; gap: .3rem; flex-wrap: wrap }
.pick-tools .aff a { font-size: .72rem }
.nope { font-size: .72rem; padding: .15rem .45rem; min-height: 0;
        background: none; border: 1px solid var(--line); color: var(--muted) }
.nope:hover { border-color: var(--warn); color: var(--warn) }
.modal-f { flex-wrap: wrap }

.pickcard.chosen { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent) }
.pickcard.chosen .rank::after { content: " ✓"; color: var(--accent) }


.fillbar { color: var(--accent); font-weight: 600; margin: .2rem 0 0 }

.styles { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center;
          margin: .4rem 0 0; justify-content: flex-end }
.styles .st { width: 100%; text-align: right; margin-bottom: .1rem }


/* 고정한 줄 — 다시 짜도 안 바뀐다 */
.lockbtn { background: none; border: 0; padding: 0 .15rem 0 0; cursor: pointer;
           font-size: .8rem; line-height: 1; min-height: 0; opacity: .45; flex: none }
.lockbtn.on { opacity: 1 }
.lockbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px }
.item.locked { background: var(--sunken); border-radius: 8px }
.item.locked .place { font-weight: 600 }

/* 날짜 후보 — 요금은 못 보여주므로 눌러서 검색으로 보낸다 */
.datepick { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center }
.datepick .st { flex-basis: 100%; margin: 0 0 .1rem; font-size: .76rem }
.datepick .aff { flex-basis: 100%; margin: .2rem 0 0 }

/* 고르기 카드 글자가 아래로 잘리지 않게 */
.pick { padding: .45rem }
.pick-t { padding: .1rem 0 }


/* 조건 필터 — 반드시 지켜야 할 것이 아니라 켜고 끄는 것 */
.modal-filters { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center;
                 padding: .45rem .8rem; border-bottom: 1px solid var(--line); flex: none }
.modal-filters .st { flex-basis: 100%; margin: 0 0 .1rem; font-size: .72rem }
.fchip {
  font-size: .76rem; padding: .15rem .5rem; border-radius: 999px; min-height: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.fchip.on { border-color: var(--accent); color: var(--accent); font-weight: 600 }
.fchip.on::before { content: "✓ " }
.fchip.clear { border-style: dashed }


/* 한눈에 보기에서 바로 고정 */

/* 고정한 줄은 한눈에 보기에서도 보이게 */
.daycard .lines li:has(.lockline.on) .l { font-weight: 600 }
@media (max-width: 36rem) {
  .daycard .lines li { grid-template-columns: minmax(0, 1fr) 5.6rem }
  .daycard .lines li .p { gap: .15rem }
}


/* 항공권 목록 */
.flightbox { margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .6rem }
.flightbox .modal-find { padding: 0 0 .5rem }
.flightbox .modal-find input { flex: 1; min-width: 7rem }
.flightlist { display: grid; gap: .3rem }
.flightlist .st { margin: .2rem 0 }
.flightrow {
  display: grid; grid-template-columns: 2rem 1fr; gap: .5rem; align-items: center;
  width: 100%; text-align: left; padding: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  color: var(--fg); cursor: pointer;
}
.flightrow:hover, .flightrow:focus-visible { border-color: var(--move) }
.flightrow img { width: 2rem; height: 2rem; object-fit: contain }
.flight-t { min-width: 0 }
.flight-t strong { display: block; font-size: .86rem }


/* ── 일정 줄 오른쪽 버튼들 ─────────────────────────────
   같은 크기, 같은 모양, 쓰임새별로 묶어 둔다. 크기가 제각각이면 눈이 줄마다
   다시 자리를 찾아야 하고, 섞여 있으면 무엇이 '보는 것' 이고 무엇이 '누르는 것'
   인지 매번 생각하게 된다.

     [🏨 ☐]      무엇인지 · 준비했는지   — 보는 것
     [선택]       숙소·항공 고르기        — 이 줄에서 할 일
     [🔓] [×]    고정 · 빼기             — 줄 자체를 다루는 것
*/
.daycard .lines li .p {
  display: flex; align-items: center; justify-content: flex-end;
  gap: .22rem; line-height: 1;
  border-left: 1px dashed var(--line); padding-left: .5rem; align-self: stretch;
}

/* 네모 버튼의 공통 크기. 손가락 영역은 가짜 레이어로 따로 넓힌다. */
.p .pcheck, .p .plink, .p .lockline {
  min-height: 0; line-height: 1; flex: none; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.p .pcheck::after, .p .plink::after, .p .lockline::after {
  content: ""; position: absolute; inset: -10px -4px;
}

/* ① 상태 — 아이콘과 체크 */
.p .pcheck {
  order: 1; gap: .2rem; cursor: pointer; margin: 0;
  flex-direction: row-reverse;            /* 아이콘 먼저, 체크 나중 */
}
.p .pcheck input {
  width: .82rem; height: .82rem; margin: 0; flex: none; accent-color: var(--accent);
}
.p .pcheck .ic { font-size: .78rem; width: 1.05em; text-align: center; flex: none }
.p .pcheck.done { opacity: .45 }

/* ② 할 일 — 하나뿐인 글자 버튼이라 알약으로 두어 눈에 띄게 */
.p .plink {
  order: 2; font-size: .7rem; padding: .08rem .34rem; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); width: auto;
  margin-left: .1rem;
}
.p .plink.has { color: var(--accent); border-color: var(--accent) }
.p .plink:hover { border-color: var(--accent); color: var(--accent) }

/* ③ 줄 자체 — 고정·빼기. 앞의 둘과 살짝 떼어 둔다 */
.p .lockline {
  background: none; border: 0; padding: 0; cursor: pointer;
  width: 1.05rem; height: 1.05rem; font-size: .76rem; color: var(--muted);
}
.p .lockline { order: 3; opacity: .4; margin-left: .2rem }
.p .lockline.on { opacity: 1 }
.p .lockline:hover { opacity: .85 }
.p .plink:focus-visible, .p .lockline:focus-visible,
.p .pcheck:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}

/* 고정한 줄은 한눈에 보기에서도 드러나게 */
.daycard .lines li:has(.lockline.on) .l { font-weight: 600 }

@media (max-width: 36rem) {
  .daycard .lines li .p { gap: .18rem; padding-left: .4rem }
  .p .plink { font-size: .66rem; padding: .06rem .26rem }
}


/* 빼기(×) — 줄 맨 앞에 살짝.
   눈에 띄게 두면 목록이 지우기 버튼 줄처럼 보인다. 평소엔 흐리게 두고
   줄에 손이 가면 또렷해진다. 누를 영역은 가짜 레이어로 넉넉히 둔다. */
.daycard .lines li .l .rmline {
  background: none; border: 0; padding: 0; margin-right: .3rem; cursor: pointer;
  min-height: 0; width: .9rem; height: .9rem; line-height: 1; font-size: .88rem;
  color: var(--muted); opacity: .22; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: -1px; transition: opacity .12s ease, color .12s ease;
}
.daycard .lines li .l .rmline::after { content: ""; position: absolute; inset: -10px -6px }
.daycard .lines li:hover .l .rmline { opacity: .55 }
.daycard .lines li .l .rmline:hover,
.daycard .lines li .l .rmline:focus-visible { opacity: 1; color: var(--warn) }
.daycard .lines li .l .rmline:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
/* 손가락 기기에서는 늘 보이게 — 올려놓을 수가 없다 */
@media (hover: none) {
  .daycard .lines li .l .rmline { opacity: .45 }
}


/* 싼 날 후보 */
.dateopt {
  display: block; width: 100%; text-align: left; margin-top: .3rem;
  padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--fg); cursor: pointer;
}
.dateopt:hover, .dateopt:focus-visible { border-color: var(--move) }
.dateopt strong { display: block; font-size: .86rem }
.dateopt.best { border-color: var(--ok) }
.dateopt.best strong::after { content: " · 가장 쌈"; color: var(--ok); font-size: .76rem }


/* ── 채팅 열기 버튼 ──
   시트를 늘 띄워 두면 화면 아래가 그만큼 줄어든다. 쓸 때만 올라오게 하고,
   평소에는 떠 있는 버튼 하나로 둔다. */
.chatfab {
  /* 화면 맨 구석에 붙여 두니 본문에서 너무 멀었다. 글이 놓인 폭(--wrap)
     안쪽 오른쪽에 세운다 — 넓은 화면에서는 글 옆에, 좁은 화면에서는
     예전처럼 구석에 선다(가운데 계산이 음수가 되면 right 가 1rem 으로). */
  position: fixed; z-index: 21;
  right: max(1rem, calc(50vw - (var(--wrap, 60rem) / 2) + 1rem));
  bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem .95rem; border-radius: 999px; font-size: .92rem; font-weight: 600;
  background: var(--accent); color: var(--accent-fg); border: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer;
}
.chatfab:hover { filter: brightness(1.06) }
.chatfab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px }
.chatfab[hidden] { display: none }
.chatfab .ic { font-size: 1.05rem; line-height: 1 }

/* 좁은 화면에서는 동그란 버튼으로 — 글자까지 넣으면 화면을 가린다 */
@media (max-width: 30rem) {
  .chatfab { padding: 0; width: 3.1rem; height: 3.1rem; justify-content: center }
  .chatfab .tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
}

/* 시트 오른쪽 위 — 크게/닫기 */
.sheettools { position: absolute; top: .4rem; right: .5rem; z-index: 2; display: flex; gap: .25rem }
.sheetbtn {
  width: 1.9rem; height: 1.9rem; min-height: 0; padding: 0; border-radius: 50%;
  background: var(--sunken); border: 1px solid var(--line); color: var(--muted);
  font-size: .85rem; line-height: 1; cursor: pointer;
}
.sheetbtn:hover { color: var(--fg); border-color: var(--muted) }
.sheetbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

/* 아래에서 올라오는 느낌. 움직임을 줄이도록 설정한 사람에게는 그냥 나타난다. */
.sheet:not([hidden]) { animation: sheetUp .18s ease-out }
@keyframes sheetUp { from { transform: translateY(14px); opacity: .6 } to { transform: none; opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .sheet:not([hidden]) { animation: none } }


/* 줄 안의 작은 버튼들 — 글자 대신 기호로 두어 한 줄에 들어가게 */
.item .line1 .sm.x {
  width: 1.6rem; height: 1.6rem; min-height: 0; padding: 0; border-radius: 50%;
  font-size: 1rem; line-height: 1; color: var(--muted); background: none;
  border: 1px solid var(--line);
}
.item .line1 .sm.x:hover { color: var(--warn); border-color: var(--warn) }

/* 예약 링크는 평소엔 접어 둔다. 고르기 창에도 같은 칸이 있어서 거의 안 쓴다. */
.item .line3 { margin-top: .3rem }

/* ── 예약 확인증 서랍 ──────────────────────────────────
   전에는 그냥 "＋ 예약 확인증" 한 줄이었다. ＋ 는 **더한다**는 뜻으로 읽혀서,
   눌렀을 때 아래가 열리는 것과 뜻이 어긋났고 아래 칸과 묶여 보이지도 않았다.
   그래서 ① 꺾쇠(▸)로 바꿔 "펼친다"로 읽히게 하고, ② 열면 테두리가 생겨
   머리와 몸이 **한 상자**가 되게 한다. 닫혀 있을 땐 테두리가 없어 조용하다. */
.item details.linkfold { margin-top: .4rem; border-radius: .45rem }
.item details.linkfold[open] {
  border: 1px solid var(--line); background: var(--sunken);
  padding: .35rem .55rem .5rem;
}
.item details.linkfold > summary {
  font-size: .76rem; color: var(--muted); cursor: pointer; list-style: none;
  padding: .15rem 0; display: flex; align-items: center; gap: .3rem;
  border-radius: .35rem;
}
.item details.linkfold > summary:hover { color: var(--fg) }
.item details.linkfold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.item details.linkfold > summary::-webkit-details-marker { display: none }
/* 꺾쇠는 열리면 아래를 가리킨다 — 그 아래가 그 내용이라는 뜻이다. */
.item details.linkfold > summary::before {
  content: "▸"; display: inline-block; font-size: .7em;
  transition: transform .15s ease;
}
.item details.linkfold[open] > summary { color: var(--fg); font-weight: 600; margin-bottom: .15rem }
.item details.linkfold[open] > summary::before { transform: rotate(90deg) }
@media (prefers-reduced-motion: reduce) {
  .item details.linkfold > summary::before { transition: none }
}
.item details.linkfold > div { display: flex; gap: .4rem; align-items: center; margin-top: .3rem }

/* ── 늘 있는 링크(지도)는 작은 아이콘 버튼으로 ──────────
   줄마다 "지도에서 보기" 가 통째로 붙으면 그 글자만 눈에 띈다. */
.aff .btn.iconbtn { padding: .2rem .5rem; font-size: .76rem; gap: .25rem }

/* 그날 할 일 접기 */
.foldbox { margin: .6rem 0 }
.foldbox > summary { font-size: .86rem; font-weight: 600; cursor: pointer; padding: .3rem 0 }

@media (max-width: 30rem) {
  .item .line1 > input.time { width: 3.6rem; font-size: .82rem }
  .item .line1 > select.kind { width: 3.9rem; font-size: .78rem }
}


/* ── 하루 머리글 — 한 줄에 ── */
.day > header { gap: .3rem }
.day > header .daytitle { flex: 1; min-width: 6rem; font-size: .92rem }
.day > header .sm { min-height: 0; padding: .2rem .45rem; font-size: .78rem; flex: none }
/* 여기서 다시 줄이지 않는다 — 모든 날을 한 번에 보는 자리라
   일차 표지가 **가장 필요한 곳**이다. */

/* 줄 아래 링크는 작게 한 줄로. 줄마다 한 칸씩 차지하면 목록이 길어진다. */
.item .aff { gap: .25rem; margin-top: .25rem }
.item .aff a { font-size: .74rem; padding: .12rem .4rem }
.item .stay-bar .sm { font-size: .74rem; padding: .15rem .45rem; min-height: 0 }
.item .line2 input.memo { font-size: .85rem; padding: .35rem .5rem }

@media (max-width: 30rem) {
  .day > header .daytitle { min-width: 4.5rem; font-size: .86rem }
  .day > header .sm { padding: .18rem .35rem; font-size: .74rem }
}


/* 대화가 비어 있을 때 — 빈 상자 대신 무엇을 할 수 있는 곳인지 */
.chatempty {
  margin: auto 0; padding: 1.2rem .4rem; text-align: center;
  display: flex; flex-direction: column; gap: .35rem; color: var(--muted);
}
.chatempty strong { font-size: 1rem; color: var(--fg) }
.chatempty span { font-size: .85rem; line-height: 1.6 }

.datepick .st { flex-basis: 100%; margin: .1rem 0 .2rem }


/* ── AI 검색조건 줄 ──────────────────────────────────────
   입력창 바로 위. AI 가 무엇을 기준으로 찾는지 보여 주고, 누르면 뺀다. */
.condbar {
  display: flex; flex-wrap: wrap; gap: .3rem; align-items: center;
  width: 100%; padding: .1rem 0 .2rem;
}
.condlead {
  font-size: .72rem; font-weight: 700; color: var(--muted);
  letter-spacing: .02em; margin-right: .1rem; white-space: nowrap;
}
.condlead::after { content: " :" }
.cond {
  display: inline-flex; align-items: center; gap: .22rem;
  padding: .22rem .45rem; min-height: 0; border-radius: 999px;
  background: var(--sunken); border: 1px solid var(--line); color: var(--fg);
  font-size: .76rem; line-height: 1.3; cursor: pointer; max-width: 100%;
}
.cond:hover { border-color: var(--warn); color: var(--warn) }
.cond:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.cond .ic { font-size: .8rem; line-height: 1 }
.cond .lb { color: var(--muted) }
.cond .vl { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 9rem }
.cond .x { color: var(--muted); font-size: .68rem; margin-left: .05rem }
.cond:hover .x { color: var(--warn) }

@media (max-width: 30rem) {
  .cond .vl { max-width: 6.5rem }
}


/* 아직 안 정한 조건 — 점선으로 비워 두고 눌러서 고른다 */
.cond.need { border-style: dashed; color: var(--muted); background: transparent }
.cond.need:hover { color: var(--accent); border-color: var(--accent) }
.cond.need .lb { color: inherit; font-weight: 600 }
.cond.need[aria-expanded="true"] { color: var(--accent); border-color: var(--accent) }

/* 고르는 줄 — 조건 줄 바로 위에 펼쳐진다 */
.needpick {
  display: flex; flex-wrap: wrap; gap: .3rem; align-items: center;
  width: 100%; padding: .3rem .1rem; border-top: 1px solid var(--line);
}
.needpick .st { flex-basis: 100%; font-size: .72rem; color: var(--muted); margin: .1rem 0 0 }


/* 칩 안의 두 버튼 — 아이콘(고정) / ✕(삭제) */
.cond .ic, .cond .x {
  border: 0; background: none; padding: 0; min-height: 0; cursor: pointer;
  line-height: 1; border-radius: 999px;
}
.cond .ic { font-size: .82rem }
.cond .ic:hover { transform: scale(1.18) }
.cond .x { color: var(--muted); font-size: .68rem; padding: .1rem .15rem }
.cond .x:hover { color: var(--warn) }
.cond .ic:focus-visible, .cond .x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }

/* 고정된 조건 — 안 바뀐다 */
.cond.fixed { border-color: var(--accent); background: var(--surface) }
.cond.fixed .vl { color: var(--accent) }
.cond.fixed .x { display: none }


/* 처음 화면의 예시 — 대화 안에서 세로로 쌓는다. 가로로 늘어놓으면 넘친다. */
.starters { display: flex; flex-direction: column; gap: .35rem; margin-top: .7rem; width: 100% }
.starters .chip {
  width: 100%; text-align: left; white-space: normal; line-height: 1.4;
  padding: .55rem .7rem; font-size: .88rem;
}

/* 대화 안에서 아직 안 정한 것 묻기 */
.needbox { margin-top: .6rem; display: flex; flex-direction: column; gap: .5rem }
.needrow { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center }
.needq { flex-basis: 100%; font-size: .82rem; font-weight: 600; color: var(--fg); margin-bottom: .1rem }
.needbox .st { font-size: .74rem; color: var(--muted) }

/* 조건 줄은 접혀서 쌓인다 — 가로로 넘쳐 잘리지 않게 */
.chips { flex-wrap: wrap }


/* 묻는 줄의 칩은 글이 길 수 있다 — 잘리지 않게 줄바꿈을 허용한다 */
.needrow .chip { white-space: normal; text-align: left; line-height: 1.35 }


/* 항공편 한 줄 — 본문(고르기) + 찜/관심없음 */
.flightwrap { border: 1px solid var(--line); border-radius: var(--r, .6rem); margin-bottom: .35rem; overflow: hidden }
.flightwrap.kept { border-color: var(--accent); background: var(--surface) }
.flightwrap > .flightrow { border: 0; border-radius: 0; margin: 0; width: 100% }
.flighttools { display: flex; gap: .3rem; justify-content: flex-end; padding: .25rem .4rem; border-top: 1px solid var(--line) }
.flighttools .sm { font-size: .74rem; padding: .2rem .5rem; min-height: 0 }
.flightwrap.kept .flighttools { border-top-color: var(--accent) }


/* ── 메인 일정 줄 ───────────────────────────────────────
   아이콘·시각·이름은 줄어들고, 오른쪽 버튼은 **절대 줄지 않는다.**
   글자가 길다고 버튼이 잘리면 열어 볼 길이 사라진다. */
.ovrow { display: flex; align-items: center; gap: .3rem; min-width: 0 }
.ovrow .l { display: flex; align-items: center; gap: .3rem; flex: 1; min-width: 0 }
.ovrow .l .ic { flex: none; font-size: .95rem; line-height: 1 }
.ovrow .l .time { flex: none; font-variant-numeric: tabular-nums }
.ovrow .l .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ovrow .p { flex: none; display: flex; gap: .2rem; align-items: center }

/* 버튼이 하나도 없는 줄 — 칸 테두리까지 지운다.
   안 그러면 오른쪽에 점선만 덩그러니 남아, 비어 있는 자리를 무언가 있는
   자리처럼 보이게 한다. 없는 것은 자리도 없어야 한다. */
.ovrow .p:empty, .daycard .lines li .p:empty {
  border-left: 0; padding-left: 0; gap: 0;
}
/* AI 가 쓰고 있는 동안의 빈 날 — 가만히 있는 글씨와 구별되어야 한다.
   같은 회색으로 두면 "미정" 과 똑같아 보여서, 기다리면 되는 것을 모르고
   사람이 손을 댄다. 글씨가 숨 쉬게 해서 **돌고 있다**고 알린다. */
.daycard .lines li.writing {
  color: var(--accent); font-style: normal;
  animation: writing-pulse 1.4s ease-in-out infinite;
}
@keyframes writing-pulse { 0%, 100% { opacity: .45 } 50% { opacity: 1 } }
/* 움직임을 꺼 둔 사람에게는 또렷하게만 보여 준다. */
@media (prefers-reduced-motion: reduce) {
  .daycard .lines li.writing { animation: none; opacity: 1 }
}


/* 열어 보는 버튼 — 넣은 것이 있으면 또렷하게, 없으면 흐리게 */
.act {
  width: 1.7rem; height: 1.7rem; min-height: 0; padding: 0; border-radius: .45rem;
  border: 1px solid var(--line); background: var(--sunken);
  font-size: .82rem; line-height: 1; cursor: pointer; opacity: .35;
}
.act.on { opacity: 1; border-color: var(--accent) }
.act:disabled { cursor: default }
.act.on:hover { background: var(--surface) }
.act:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }

/* 확정된 줄 — 다시 짜도 안 바뀐다 */
.ovrow.fixed { background: var(--ok-bg, #eaf5ef); border-radius: .4rem }


/* ── 확정 버튼 ─────────────────────────────────────────
   그림만으론 뜻이 안 통해 글자를 적는다. 확정한 줄은 초록으로. */
.lockbtn {
  flex: none; min-height: 0; padding: .25rem .5rem; border-radius: .4rem;
  border: 1px solid var(--line); background: var(--sunken); color: var(--muted);
  font-size: .74rem; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap;
}
.lockbtn:hover { border-color: var(--accent); color: var(--accent) }
.lockbtn.on { background: var(--ok-bg, #eaf5ef); border-color: var(--ok, #2f7d58); color: var(--ok, #2f7d58) }
.item.locked { background: var(--ok-bg, #eaf5ef); border-radius: .5rem }
.item.locked input, .item.locked select, .item.locked textarea { opacity: .85 }

/* 날 머리의 버튼 */
.day > header .sm.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.day > header .sm.danger { color: var(--warn); border-color: var(--line) }
.day > header .sm.danger:hover { border-color: var(--warn) }


/* 예약 확인증 칸 */
.linkfold .st { font-size: .76rem; color: var(--muted); margin: .2rem 0 .4rem }
.linkfold .line3 { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; margin-top: .3rem }
.linkfold .line3 > input.link { flex: 1; min-width: 10rem }
.linkfold .line3 > .st { flex: 1; min-width: 6rem; margin: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap }


/* 이동 수단 고르기 — 이동일 때만 보인다 */
.item .line1 > select.movekind { width: 6rem; flex: none; padding: .4rem .2rem; font-size: .82rem }
.item .line1 > select.movekind[hidden] { display: none }
@media (max-width: 30rem) { .item .line1 > select.movekind { width: 5rem; font-size: .76rem } }


/* ── 카드 사이 (+) ─────────────────────────────────────
   **한 행을 쭉 차지하는 줄**로 둔다. 버튼 셋을 늘어놓으니 일정보다 버튼이
   많아 보였고, 어디에 들어가는지도 안 보였다. 줄이 통째로 밝아지면
   "여기에 카드가 들어간다" 가 그대로 읽힌다. */
.plusrow { padding: .1rem 0 }
.plusbtn {
  display: flex; align-items: center; justify-content: center; gap: .35rem;
  width: 100%; min-height: 0; height: 1.6rem; padding: 0; border-radius: .5rem;
  border: 1px dashed transparent; background: none; color: transparent;
  font-size: .76rem; cursor: pointer; transition: none;
}
/* 평소엔 가느다란 선 하나. 가까이 가야 글자가 나온다 — 늘 보이면 시끄럽다. */
.plusbtn::before {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: var(--line);
}
.plusrow { position: relative }
.plusbtn { position: relative; z-index: 1 }
.plusbtn .sign { font-size: .95rem; line-height: 1 }
.plusbtn:hover, .plusbtn:focus-visible {
  border-color: var(--accent); color: var(--accent); background: var(--surface);
}
.plusbtn:hover::before, .plusbtn:focus-visible::before { background: transparent }
.plusbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }

/* 날 끝 — 정렬과 날 이동 */
.daytail { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
           justify-content: space-between; margin-top: .7rem; padding-top: .6rem;
           border-top: 1px solid var(--line) }
.daynav { display: flex; gap: .4rem }


/* ── 그날 할 일 ────────────────────────────────────────
   ✕ 가 저 멀리 오른쪽에 떠 있으면 어느 줄 것인지 눈으로 이어야 한다.
   글자 바로 옆에 붙이고, 평소엔 흐리게 둔다. */
.todosbox { display: flex; flex-direction: column; gap: .3rem }
.todohead { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem }
.todohead .label { font-weight: 700; font-size: .92rem }
.todohead .st { font-size: .76rem; color: var(--muted) }

.todorow {
  display: flex; align-items: center; gap: .35rem;
  padding: .3rem .4rem; border-radius: .45rem;
}
.todorow:hover { background: var(--sunken) }
.todorow .check { display: flex; align-items: center; gap: .45rem; flex: 1; min-width: 0; cursor: pointer }
.todorow .check .tx { flex: 1; min-width: 0; line-height: 1.4 }
.todorow.done .check .tx { color: var(--muted); text-decoration: line-through }

.todox {
  flex: none; width: 1.6rem; height: 1.6rem; min-height: 0; padding: 0;
  border: 0; background: none; color: var(--muted);
  font-size: .82rem; line-height: 1; border-radius: 50%; cursor: pointer; opacity: .4;
}
.todorow:hover .todox, .todox:focus-visible { opacity: 1 }
.todox:hover { color: var(--warn); background: var(--surface) }
.todox:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }

.todoadd { display: flex; gap: .35rem; margin-top: .35rem }
.todoadd input { flex: 1; min-width: 0 }
.todoadd .sm.primary { flex: none; background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }


/* ── 일정 줄의 칸 높이·글자 맞추기 ──────────────────────
   장소 칸만 글자가 크고 높이도 달라 줄이 들쭉날쭉했다. 한 줄 안의 칸은
   **같은 크기**여야 눈이 가로로 미끄러진다. */
.item .line1 > input,
.item .line1 > select {
  height: 2.2rem; min-height: 0; font-size: .88rem; line-height: 1.2;
  padding: .3rem .45rem; border-radius: .45rem;
}
.item .line1 > input.place { font-size: .88rem; font-weight: 500 }
.item .line1 > input.time { text-align: center; font-variant-numeric: tabular-nums }
.item .line2 > input.memo { height: 2.1rem; min-height: 0; font-size: .84rem; padding: .3rem .45rem }

/* ── 작은 버튼 색감 ────────────────────────────────────
   베이지 덩어리처럼 커 보였다. 테두리만 두고 바탕은 비워 가볍게. */
.item .line3 button,
.item .line3 a.btn,
.item > .aff a.btn,
.item > .aff button {
  min-height: 0; height: 1.9rem; padding: .25rem .55rem; border-radius: .45rem;
  font-size: .78rem; font-weight: 500;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.item .line3 button:hover,
.item .line3 a.btn:hover,
.item > .aff a.btn:hover,
.item > .aff button:hover { background: var(--sunken); border-color: var(--muted); color: var(--fg) }

/* 확정 버튼은 줄 안의 다른 칸과 높이를 맞춘다 */
.item .line1 > .lockbtn { height: 2.2rem; display: inline-flex; align-items: center }
.item .line1 > .grip { height: 2.2rem; display: inline-flex; align-items: center }


/* 그날 경로 지도 */
.daymap { height: 18rem; border: 1px solid var(--line); border-radius: .5rem; margin: .4rem 0 }
.daypin {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-fg);
  border-radius: 50%; font-size: .74rem; font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* 로그인은 머리말 **맨 윗줄 오른쪽**에 혼자 선다. 도구 단추들과 같은 줄에
   섞으면 "지금 누구로 들어와 있나" 가 그 사이에 묻힌다. */
.headright .loginrow { display: flex; justify-content: flex-end; margin-bottom: .35rem }
.headright .loginrow:empty { display: none }

/* 날짜 칸 — 글자 칸 + 달력 단추. 숨긴 date 칸이 달력을 띄운다. */
.datefield { display: flex; gap: .3rem; align-items: center }
.datefield > input[type=text] { flex: 1; min-width: 0; font-family: var(--m); letter-spacing: .04em }
.datefield > .themebtn { flex: none }
/* 눈에는 안 보이되 화면낭독기와 달력에는 살아 있어야 한다 —
   display:none 이면 showPicker() 가 안 뜬다. */
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
