:root { --daangn:#E45A12; --fg:#1c1917; --muted:#78716c; --paper:#fff; --sunken:#f5f0eb; --border:#e7e0d8; }
* { box-sizing: border-box; }
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif; background:#f3eee8; color:var(--fg); }
.wrap { max-width:760px; margin:0 auto; padding:16px 16px 96px; }
header { background:var(--daangn); color:#fff; border-radius:14px; padding:22px 22px 18px; }
header p { margin:0; font-size:11px; letter-spacing:.12em; opacity:.85; text-transform:uppercase; }
header h1 { margin:6px 0 0; font-size:26px; }
header .sub { margin-top:8px; font-size:14px; opacity:.92; letter-spacing:0; text-transform:none; }
.tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:14px 0; }
.tabs button, .btn, .chip, .menu, .type { border:0; cursor:pointer; font-family:inherit; }
.tabs button { height:48px; border-radius:12px; font-weight:700; background:var(--paper); }
.tabs button.on { background:var(--daangn); color:#fff; }
.card { background:var(--paper); border-radius:14px; padding:16px; margin-bottom:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
h2 { margin:0 0 8px; font-size:15px; }
.hint { font-size:12px; color:var(--muted); line-height:1.5; margin:0 0 12px; }
.btn { height:48px; border-radius:10px; font-weight:700; padding:0 16px; }
.btn.primary { background:var(--daangn); color:#fff; width:100%; font-size:16px; }
.btn.ghost { background:var(--sunken); }
.types, .menus { display:grid; gap:8px; }
.types { grid-template-columns:1fr 1fr; }
.type, .menu { text-align:left; background:var(--sunken); border-radius:10px; padding:10px 12px; font-size:13px; }
.type.on, .menu.on { background:#fde8d8; font-weight:700; }
.menus { max-height:220px; overflow:auto; }
.cats { display:flex; gap:6px; overflow:auto; padding-bottom:8px; }
.chip { height:34px; border-radius:999px; padding:0 12px; background:var(--sunken); font-size:12px; white-space:nowrap; }
.chip.on { background:var(--daangn); color:#fff; }
textarea, input, select { width:100%; border:0; background:var(--sunken); border-radius:10px; padding:10px 12px; font-family:inherit; font-size:14px; line-height:1.6; }
textarea { min-height:160px; resize:vertical; }
.row { display:flex; gap:8px; margin-top:8px; }
.out { display:grid; gap:12px; }
@media (min-width:700px) { .out { grid-template-columns:1fr 1fr; } .types { grid-template-columns:1fr 1fr 1fr; } }
.head { background:var(--daangn); color:#fff; border-radius:14px 14px 0 0; padding:12px 14px; display:flex; justify-content:space-between; align-items:center; font-weight:700; }
.head small { display:block; font-weight:400; opacity:.9; font-size:11px; }
.copy { background:rgba(255,255,255,.18); color:#fff; border:0; border-radius:8px; height:34px; padding:0 12px; font-weight:700; cursor:pointer; }
.emoji { display:flex; flex-wrap:wrap; gap:2px; padding:8px; background:var(--sunken); border-radius:0 0 14px 14px; }
.emoji button { width:32px; height:32px; background:transparent; border-radius:8px; font-size:16px; }
.hidden { display:none !important; }
label.check { display:flex; gap:8px; align-items:center; font-size:14px; margin:6px 0; }
ol.tips { margin:0; padding:0; list-style:none; }
ol.tips li { display:flex; gap:10px; font-size:14px; line-height:1.5; margin:8px 0; }
ol.tips b { width:20px; height:20px; border-radius:99px; background:var(--sunken); display:flex; align-items:center; justify-content:center; font-size:11px; flex:none; }
.toast { position:fixed; left:50%; bottom:84px; max-width:90vw; text-align:center; transform:translateX(-50%); background:#1c1917; color:#fff; padding:10px 16px; border-radius:999px; font-size:13px; z-index:9; }
.bar { position:fixed; left:0; right:0; bottom:0; background:rgba(255,255,255,.96); border-top:1px solid var(--border); padding:10px 16px; }
.bar inner, .bar .inner { max-width:760px; margin:0 auto; display:flex; gap:8px; }
.bar .btn { flex:1; height:44px; }
.bar .btn.primary { flex:2; }
.btn.big { height:60px; font-size:18px; border-radius:14px; margin:4px 0 14px; }
.opt { font-weight:400; color:var(--muted); font-size:12px; margin-left:6px; }
.qchips { display:flex; flex-wrap:wrap; gap:8px; }
.qchip { border:0; font-family:inherit; cursor:pointer; min-height:44px; padding:0 14px; border-radius:12px; background:var(--sunken); font-size:15px; }
.qchip.on { background:var(--daangn); color:#fff; font-weight:700; }
#quickMenus { max-height:300px; overflow:auto; padding:2px 0; }
.qchip small { font-weight:400; opacity:.75; margin-left:4px; font-size:12px; }
.today { font-size:13px; color:var(--muted); margin:0 0 10px; }
details.fold { padding:0; }
details.fold > summary { list-style:none; cursor:pointer; padding:16px; font-weight:700; font-size:15px; display:flex; justify-content:space-between; }
details.fold > summary::-webkit-details-marker { display:none; }
details.fold > summary::after { content:"열기"; font-weight:400; font-size:13px; color:var(--muted); }
details.fold[open] > summary::after { content:"닫기"; }
details.fold > .in { padding:0 16px 16px; }
.field { display:grid; gap:4px; margin-bottom:10px; font-size:13px; color:var(--muted); }
.out.single { grid-template-columns:1fr !important; }
.wx { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:6px; }
.wx .btn { height:44px; }
.wxs { font-size:13px; color:var(--muted); }
.wxg { background:#fde8d8; border-radius:10px; padding:10px 12px; font-size:14px; margin:4px 0 8px; }
.switch { display:flex; justify-content:space-between; align-items:center; gap:10px; background:var(--sunken); border-radius:10px; padding:10px 12px; margin-bottom:10px; font-size:14px; }
.switch input { width:22px; height:22px; flex:none; }
.tagtools { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.tagtools .btn { height:40px; font-size:13px; }
.out.single textarea { min-height:340px; font-size:15px; }
/* ---- 휴대폰 최적화 ---- */
html { -webkit-text-size-adjust:100%; }
body { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button { touch-action:manipulation; }
textarea, input, select { font-size:16px; }
input[type=checkbox] { width:22px; height:22px; flex:none; padding:0; accent-color:var(--daangn); }
.wrap { padding:12px 12px calc(110px + env(safe-area-inset-bottom, 0px)); }
header { padding:18px 18px 16px; }
header h1 { font-size:23px; }
.chip { height:40px; font-size:14px; padding:0 14px; }
.type, .menu { min-height:46px; font-size:14px; }
.menus { max-height:280px; }
.copy { height:40px; padding:0 16px; font-size:15px; }
.emoji { gap:4px; }
.emoji button { width:42px; height:42px; font-size:22px; border:0; background:transparent; border-radius:10px; }
.emoji button:active { background:#fde8d8; }
#emojiList button { width:auto; padding:0 10px; background:var(--paper); }
.out .card { scroll-margin-top:12px; }
.out textarea { overflow:hidden; resize:none; min-height:180px; font-size:16px; line-height:1.65; }
.bar { padding:10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
.bar .btn { height:52px; font-size:16px; }
.toast { bottom:calc(84px + env(safe-area-inset-bottom, 0px)); }
label.check { min-height:44px; font-size:15px; }
.hint { font-size:13px; }
@media (max-width:699px) {
  header { padding:14px 16px; border-radius:12px; }
  header p:first-child { display:none; }
  header h1 { margin:0; font-size:20px; }
  header .sub { margin-top:4px; font-size:13px; }
  .tabs { margin:10px 0; }
  .tabs button { height:44px; }
  .today { margin:0 0 8px; }
  #quickMenus { max-height:212px; }
  .qchip { min-height:42px; font-size:15px; padding:0 12px; }
}
details.mini { margin:0 0 8px; }
#swapCard { display:none !important; }
.card.result { border:3px solid var(--daangn); box-shadow:0 4px 14px rgba(228,90,18,.18); }
.card.result .head { border-radius:0; }
.card.result .pv { background:#fffaf6; }
.card.result .pvhint, .card.result .chan { background:#fffaf6; }
#resetBox { margin:4px 0 14px; }
.rst { width:100%; height:48px; border:1.5px solid #e7b9a3; background:var(--paper); color:#b4441a; border-radius:12px; font:inherit; font-weight:700; font-size:15px; cursor:pointer; }
.rstc { background:#fff1ee; border:1.5px solid #f0b3a3; border-radius:12px; padding:12px; }
.rstc p { margin:0 0 10px; font-size:14px; font-weight:700; }
.rstc .row2 { display:flex; gap:8px; }
.rstc .btn { flex:1; height:46px; }
.btn.danger { background:#c8401a; color:#fff; }
.rstn { margin:6px 0 0; text-align:center; font-size:12px; color:var(--muted); }
.pvhint.chg { color:var(--daangn); font-weight:700; }
@keyframes flashbg { from { background:#fde8d8; } to { background:var(--sunken); } }
.flash { animation:flashbg .8s ease-out; }
@media (prefers-reduced-motion: reduce) { .flash { animation:none; } }
.pvhint { margin:0; padding:10px 16px 0; font-size:12px; color:var(--muted); background:var(--sunken); }
.pv { background:var(--sunken); padding:8px 16px 14px; font-size:16px; line-height:1.65; word-break:keep-all; }
.pl { white-space:pre-wrap; }
.pgap { height:.75em; }
.tg { white-space:nowrap; }
.swp { display:flex; align-items:center; gap:10px; width:calc(100% + 16px); margin:3px -8px; padding:6px 8px; background:#fff; border:1.5px dashed #f2a97a; border-radius:10px; font:inherit; text-align:left; cursor:pointer; color:inherit; }
.swp span { flex:1; }
.swp em { flex:none; font-style:normal; font-size:11px; font-weight:700; color:var(--daangn); text-align:center; line-height:1.35; }
.swp:active { background:#fde8d8; }
details.edit > summary { list-style:none; padding:12px 16px; font-weight:700; font-size:14px; cursor:pointer; border-top:1px solid var(--border); background:var(--paper); }
details.edit > summary::-webkit-details-marker { display:none; }
.evbar { display:flex; align-items:center; gap:8px; width:100%; min-height:44px; border:1.5px solid #f6c7a8; background:#fff4ec; border-radius:12px; padding:0 14px; font-family:inherit; font-size:14px; cursor:pointer; text-align:left; margin-bottom:10px; }
.evbar b { white-space:nowrap; }
.evbar span { flex:1; color:var(--muted); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.evbar i { font-style:normal; font-size:13px; color:var(--daangn); font-weight:700; }
.evbar.open { border-radius:12px 12px 0 0; margin-bottom:0; }
.evpanel { border:1.5px solid #f6c7a8; border-top:0; background:#fff4ec; border-radius:0 0 12px 12px; padding:4px 14px 14px; margin-bottom:10px; }
.evt { background:#fff4ec; border:1.5px solid #f6c7a8; border-radius:14px; padding:14px; margin-bottom:12px; }
.ev-h { font-size:16px; }
.ev-s { font-size:13px; color:var(--muted); margin:4px 0 10px; line-height:1.5; }
.ev-b { display:flex; gap:8px; flex-wrap:wrap; }
.evb { height:44px; flex:1; font-size:14px; min-width:130px; }
.ev-others { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.chan { display:flex; gap:6px; padding:10px 12px 0; background:var(--sunken); overflow-x:auto; }
.chan .chip { height:36px; flex:none; }
.chan .chip:not(.on) { background:var(--paper); }
.logsum { background:var(--sunken); border-radius:10px; padding:10px 12px; font-size:14px; line-height:1.6; }
.logi { border-top:1px solid var(--border); padding:12px 0; }
.logh { display:flex; gap:8px; align-items:center; font-size:14px; }
.logh span { color:var(--muted); font-size:13px; flex:1; }
.logdel { border:0; background:transparent; color:var(--muted); font-size:13px; min-height:36px; cursor:pointer; font-family:inherit; }
.logf { font-size:14px; margin:4px 0 8px; line-height:1.5; }
.swap { display:flex; align-items:center; gap:10px; width:100%; border:0; cursor:pointer; font-family:inherit; text-align:left; background:var(--sunken); border-radius:12px; padding:10px 12px; margin-bottom:8px; min-height:56px; }
.swap .sw-t { flex:1; display:flex; flex-direction:column; gap:2px; font-size:14px; }
.swap .sw-t small { color:var(--muted); font-size:13px; line-height:1.4; }
.swap .sw-n { flex:none; font-size:12px; font-weight:700; color:var(--daangn); text-align:center; line-height:1.3; }
.swap:active { background:#fde8d8; }
#types { display:block; }
.hint.grp { margin:12px 0 6px; }
.cats.wrapc { flex-wrap:wrap; overflow:visible; margin-bottom:8px; }
.picked { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; }
.picked .hint { margin:0; flex:1; }
.btn.clr { height:40px; flex:none; font-size:14px; padding:0 14px; }
.btn.clr:disabled { opacity:.4; }
.h2row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.h2row h2 { margin:0; }
details.mini > summary { cursor:pointer; font-size:13px; color:var(--daangn); font-weight:700; min-height:40px; display:flex; align-items:center; }
#tags .cats, #sits .cats { flex-wrap:wrap; overflow:visible; }
@media (min-width:700px) { .wrap { padding:16px 16px 110px; } }
.off { display: none !important; }
