:root {
  --bg: #f7f3ee;
  --paper: #ffffff;
  --paper-soft: #fffaf5;
  --text: #1b1b1b;
  --muted: #777;
  --line: #e6dcd0;
  --grid-line: #eeeeee;
  --primary: #ff7a45;
  --primary-dark: #d95725;
  --primary-soft: #fff0e8;
  --blue-soft: #eef3ff;
  --green-soft: #edf9f2;
  --yellow-soft: #fff7e4;
  --purple-soft: #f5efff;
  --gray-soft: #f1f1f1;
  --danger: #d94a4a;
  --shadow: 0 12px 28px rgba(40, 30, 20, .09);
  --radius-xl: 26px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --row-h: 23px;
  --time-col: 54px;
  --day-w: 142px;
  --day-count: 4;
  --hour-count: 18;
  --grid-w: calc(var(--time-col) + (var(--day-w) * var(--day-count)));
  --grid-h: calc(var(--row-h) * var(--hour-count));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #eee6dd;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, #fff8f0 0%, var(--bg) 44%, #f5eee6 100%);
  position: relative;
  overflow-x: hidden;
}

.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: calc(28px + var(--safe-bottom));
}

.screen.active {
  display: block;
}

.home-hero {
  padding: 28px 20px 14px;
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand {
  min-width: 0;
}

.brand b {
  display: block;
  font-size: 18px;
  letter-spacing: -.3px;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mode-label {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: #333;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.headline {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -1px;
}

.headline-sub {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.create-card {
  margin: 20px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fff, #fff6ee);
  border: 1px solid rgba(232, 222, 210, .9);
  box-shadow: var(--shadow);
}

.create-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -.4px;
}

.create-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 900;
}

.primary-btn {
  background: #1f1f1f;
  color: white;
  box-shadow: 0 12px 26px rgba(20,20,20,.14);
}

.secondary-btn {
  background: #f2eee9;
  color: #333;
}

.danger-btn {
  background: #fff0f0;
  color: var(--danger);
}

.section {
  margin: 22px 20px 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.section-title h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.2px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.trip-list {
  display: grid;
  gap: 11px;
}

.trip-item {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(40, 30, 20, .05);
  display: grid;
  gap: 10px;
}

.trip-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trip-item h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.2px;
}

.trip-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.trip-badge {
  flex: none;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.trip-stats {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.stat {
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  border-radius: 999px;
  padding: 6px 9px;
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

.open-btn {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 11px 12px;
  border-radius: 15px;
  font-weight: 900;
  font-size: 13px;
}

.planner {
  padding-bottom: calc(28px + var(--safe-bottom));
}

.planner-top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(232, 222, 210, .75);
  background: rgba(247, 243, 238, .9);
  backdrop-filter: blur(16px);
}

.planner-line {
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  gap: 8px;
}

.text-btn {
  min-width: 58px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.84);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 900;
  color: #333;
}

.planner-title {
  min-width: 0;
  text-align: center;
}

.planner-title b {
  display: block;
  font-size: 16px;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-title span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.planner-actions::-webkit-scrollbar {
  display: none;
}

.action-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  color: #333;
}

.action-chip.primary {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: rgba(255, 122, 69, .25);
}

.sheet-wrap {
  margin: 12px 16px 0;
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  background: #fffaf5;
  border-bottom: 1px solid var(--line);
}

.sheet-head b {
  font-size: 15px;
}

.sheet-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.excel-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  max-height: calc(100vh - 230px);
}

.excel-grid {
  width: var(--grid-w);
  position: relative;
  background: #fff;
}

.excel-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: var(--time-col) repeat(var(--day-count), var(--day-w));
  width: var(--grid-w);
  height: 40px;
  background: #fff4e9;
  border-bottom: 1px solid var(--grid-line);
}

.head-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--grid-line);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
  text-align: center;
}

.head-cell small {
  display: block;
  margin-top: 2px;
  color: #8c7767;
  font-size: 10px;
  font-weight: 800;
}

.grid-body {
  width: var(--grid-w);
  height: var(--grid-h);
  position: relative;
  background: #fff;
  overflow: hidden;
}

.grid-lines {
  position: absolute;
  left: var(--time-col);
  top: 0;
  width: calc(var(--day-w) * var(--day-count));
  height: var(--grid-h);
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      var(--grid-line) calc(var(--row-h) - 1px),
      var(--grid-line) var(--row-h)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-w) - 1px),
      var(--grid-line) calc(var(--day-w) - 1px),
      var(--grid-line) var(--day-w)
    );
  background-color: #fff;
}

.time-label {
  position: absolute;
  left: 0;
  top: calc(var(--i) * var(--row-h));
  width: var(--time-col);
  height: var(--row-h);
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  background: #fffaf5;
  color: #777;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
}

.empty-hit {
  position: absolute;
  top: 0;
  height: var(--grid-h);
  width: var(--day-w);
  cursor: pointer;
}

.event-block {
  position: absolute;
  left: calc(var(--time-col) + (var(--day) * var(--day-w)));
  top: calc(var(--start) * var(--row-h));
  width: var(--day-w);
  height: calc(var(--dur) * var(--row-h));
  border-radius: 6px;
  padding: 3px 5px;
  border: 1px solid rgba(0,0,0,.07);
  background: var(--primary-soft);
  box-shadow: none;
  overflow: hidden;
  z-index: 5;
}

.event-block.blue { background: var(--blue-soft); }
.event-block.green { background: var(--green-soft); }
.event-block.yellow { background: var(--yellow-soft); }
.event-block.purple { background: var(--purple-soft); }
.event-block.gray { background: var(--gray-soft); }

.event-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 1.13;
  font-weight: 950;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.25px;
}

.event-sub {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin-top: 1px;
  color: #686868;
  font-size: 9px;
  line-height: 1.15;
  font-weight: 800;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-block.short .event-title {
  -webkit-line-clamp: 1;
}

.event-block.short .event-sub {
  display: none;
}

.event-block.medium .event-title {
  -webkit-line-clamp: 2;
}

.event-block.medium .event-sub {
  -webkit-line-clamp: 1;
}

.current-line {
  position: absolute;
  left: var(--time-col);
  width: calc(var(--day-w) * var(--day-count));
  height: 0;
  border-top: 2px solid rgba(255, 92, 92, .8);
  z-index: 6;
  pointer-events: none;
  display: none;
}

.current-line.active {
  display: block;
}

.current-line::before {
  content: "현재";
  position: absolute;
  left: 4px;
  top: -10px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #ff5c5c;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.bottom-create {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 25;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(255,255,255,.86);
  border-top: 1px solid rgba(232, 222, 210, .9);
  backdrop-filter: blur(16px);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.34);
}

.sheet-backdrop.active {
  display: flex;
}

.sheet {
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 12px 18px calc(18px + var(--safe-bottom));
  box-shadow: 0 -18px 42px rgba(0,0,0,.2);
  animation: sheetUp .18s ease-out;
}

@keyframes sheetUp {
  from { transform: translateY(18px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}

.handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #e4e4e4;
  margin: 0 auto 15px;
}

.sheet h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.5px;
}

.sheet-desc {
  margin: 6px 0 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: #4a4a4a;
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfaf8;
  padding: 13px 12px;
  color: var(--text);
  outline: 0;
}

.field textarea {
  min-height: 82px;
  resize: none;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  flex-wrap: nowrap;
}

.color-choice {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0;
  font-size: 0;
  color: transparent;
  box-shadow: 0 0 0 1px var(--line);
  background: var(--primary-soft);
}

.color-choice.orange { background: #ffe8dc; }
.color-choice.blue { background: #dfe9ff; }
.color-choice.green { background: #dff4e8; }
.color-choice.yellow { background: #fff0bf; }
.color-choice.purple { background: #eadfff; }
.color-choice.pink { background: #ffe0eb; }
.color-choice.gray { background: #ededed; }

.color-choice.active {
  box-shadow: 0 0 0 2px #1f1f1f;
  border-color: #fff;
}

.event-block.pink { background: #ffe0eb; }

.attach-row,
.library-list,
.member-list {
  display: grid;
  gap: 8px;
}

.attach-card,
.member-card,
.library-card {
  border: 1px solid var(--line);
  background: #fbfaf8;
  border-radius: 15px;
  padding: 11px;
  font-size: 12px;
}

.attach-card a,
.library-card a {
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
  word-break: break-all;
}

.attach-card small,
.member-card small,
.library-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.file-input {
  padding: 11px !important;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
  margin-top: 16px;
}

.sheet-actions.three {
  grid-template-columns: 1fr 1fr 1.35fr;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 80;
  max-width: 390px;
  width: calc(100% - 40px);
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(30,30,30,.94);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: none;
}

.toast.active {
  display: block;
}


.grid-cell {
  position: absolute;
  z-index: 2;
  height: var(--row-h);
  width: var(--day-w);
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: cell;
}

.grid-cell:hover {
  border-color: rgba(31, 31, 31, .26);
  background: rgba(31, 31, 31, .018);
}

.excel-scroll.selecting .grid-cell,
.excel-scroll.selecting .grid-cell:hover,
.grid-cell.drag-start,
.grid-cell.drag-over {
  border-color: transparent;
  background: transparent;
}

.selection-box {
  position: absolute;
  z-index: 4;
  left: calc(var(--time-col) + (var(--sel-day) * var(--day-w)));
  top: calc(var(--sel-start) * var(--row-h));
  width: var(--day-w);
  height: calc((var(--sel-end) - var(--sel-start) + 1) * var(--row-h));
  border: 2px solid rgba(255, 122, 69, .9);
  border-radius: 6px;
  background: rgba(255, 122, 69, .10);
  pointer-events: none;
}

.excel-scroll.selecting {
  user-select: none;
  touch-action: none;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.36);
  padding: 22px;
}

.confirm-backdrop.active {
  display: flex;
}

.confirm-box {
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(0,0,0,.24);
  padding: 20px;
}

.confirm-box h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.4px;
}

.confirm-box p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.confirm-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfaf8;
  padding: 13px 12px;
  outline: 0;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}


.event-block {
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, opacity .12s ease;
  touch-action: none;
}

.event-block.pressed {
  transform: translateY(1px) scale(.995);
  filter: brightness(.97);
  box-shadow: inset 0 0 0 999px rgba(0,0,0,.025);
}

.event-block.dragging-source {
  opacity: .42;
  filter: grayscale(.08);
}

.move-ghost {
  position: absolute;
  z-index: 7;
  left: calc(var(--time-col) + (var(--move-day) * var(--day-w)));
  top: calc(var(--move-start) * var(--row-h));
  width: var(--day-w);
  height: calc(var(--move-dur) * var(--row-h));
  border-radius: 6px;
  border: 2px solid rgba(31, 31, 31, .78);
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  pointer-events: none;
}

.move-ghost.conflict {
  border-color: rgba(217, 74, 74, .95);
  background: rgba(217, 74, 74, .10);
}

.move-ghost::after {
  content: "이동";
  position: absolute;
  right: 5px;
  top: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(31, 31, 31, .82);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.move-ghost.conflict::after {
  content: "겹침";
  background: rgba(217, 74, 74, .95);
}


/* v1.4: 30분 단위 선택 및 커스텀 시간 선택창 */
.grid-half-cell {
  position: absolute;
  z-index: 2;
  height: calc(var(--row-h) / 2);
  width: var(--day-w);
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: cell;
}

.grid-half-cell:hover {
  border-color: rgba(31, 31, 31, .22);
  background: rgba(31, 31, 31, .016);
}

.excel-scroll.selecting .grid-half-cell,
.excel-scroll.selecting .grid-half-cell:hover,
.grid-half-cell.drag-start,
.grid-half-cell.drag-over {
  border-color: transparent;
  background: transparent;
}

.selection-box {
  left: calc(var(--time-col) + (var(--sel-day) * var(--day-w)));
  top: calc((var(--sel-start-slot) * var(--row-h)) / 2);
  width: var(--day-w);
  height: calc(((var(--sel-end-slot) - var(--sel-start-slot) + 1) * var(--row-h)) / 2);
}

.move-ghost {
  left: calc(var(--time-col) + (var(--move-day) * var(--day-w)));
  top: calc((var(--move-start-slot) * var(--row-h)) / 2);
  width: var(--day-w);
  height: calc((var(--move-dur-slots) * var(--row-h)) / 2);
}

.time-display {
  cursor: pointer;
  background: #fbfaf8;
}

.time-display:focus {
  border-color: rgba(31,31,31,.35);
}

.time-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.28);
}

.time-picker-backdrop.active {
  display: flex;
}

.time-picker {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 12px 18px calc(18px + var(--safe-bottom));
  box-shadow: 0 -18px 42px rgba(0,0,0,.22);
}

.time-picker h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.4px;
}

.time-picker p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.time-wheel {
  height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.92), rgba(255,255,255,0) 28%),
    linear-gradient(to top, rgba(255,255,255,.92), rgba(255,255,255,0) 28%),
    #fbfaf8;
  scroll-snap-type: y mandatory;
  padding: 78px 0;
}

.time-option {
  height: 44px;
  border: 0;
  background: transparent;
  width: 100%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  color: #8b8178;
  scroll-snap-align: center;
}

.time-option.active {
  color: #111;
  font-size: 26px;
  background: var(--primary-soft);
}

.time-picker-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 14px;
}


/* v1.5: 상세보기/편집 분리 */
.field textarea[readonly],
.field input[readonly] {
  color: #333;
}

.sheet-actions.three > .secondary-btn:first-child:last-child {
  grid-column: 1 / -1;
}


/* v1.5: 시간표 선택/이동을 1시간 단위로 복귀 */
.selection-box {
  left: calc(var(--time-col) + (var(--sel-day) * var(--day-w)));
  top: calc(var(--sel-start) * var(--row-h));
  width: var(--day-w);
  height: calc((var(--sel-end) - var(--sel-start) + 1) * var(--row-h));
}

.move-ghost {
  left: calc(var(--time-col) + (var(--move-day) * var(--day-w)));
  top: calc(var(--move-start) * var(--row-h));
  width: var(--day-w);
  height: calc(var(--move-dur) * var(--row-h));
}

.time-picker p::after {
  content: "";
}


/* v1.6: 로그인/회원가입/로고 */
.auth-hero {
  padding: 34px 20px 18px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.app-logo.small {
  margin-bottom: 0;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff8b54 0%, #ff6b7d 55%, #6f8cff 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -.4px;
  box-shadow: 0 12px 26px rgba(255, 122, 69, .28);
}

.app-logo.small .logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  font-size: 13px;
}

.app-logo b {
  display: block;
  font-size: 18px;
  letter-spacing: -.4px;
}

.app-logo span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.auth-card {
  margin: 20px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 18px;
  background: #f3eee8;
  margin-bottom: 16px;
}

.auth-tab {
  border: 0;
  border-radius: 14px;
  background: transparent;
  padding: 11px;
  font-size: 14px;
  font-weight: 900;
  color: #777;
}

.auth-tab.active {
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 6px 18px rgba(40,30,20,.08);
}

.auth-form {
  display: block;
}

.auth-form.hidden {
  display: none;
}


/* v1.7: TripBoard auth/detail UI */
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 14px;
  color: #4a4a4a;
  font-size: 13px;
  font-weight: 800;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: #1f1f1f;
}

.link-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: #444;
  padding: 13px 10px 2px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.view-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 0;
}

.view-mode-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 11px 10px;
  font-size: 13px;
  font-weight: 900;
  color: #555;
}

.view-mode-btn.active {
  background: #1f1f1f;
  color: #fff;
  border-color: #1f1f1f;
}

.day-view-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-view-tabs::-webkit-scrollbar {
  display: none;
}

.day-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 15px;
  padding: 9px 12px;
  min-width: 76px;
  font-size: 12px;
  font-weight: 900;
  color: #555;
}

.day-tab.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: rgba(255, 122, 69, .28);
}

#signupScreen .auth-card {
  margin-top: 4px;
}

#signupScreen .auth-hero {
  padding-bottom: 4px;
}


/* v1.8: 전체 보기만 사용 / 표 꽉차게 / 시간 열 고정 */
.view-mode-row,
.day-view-tabs {
  display: none !important;
}

.sheet-wrap {
  margin: 12px 0 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
}

.sheet-head {
  border-radius: 0;
}

.excel-scroll {
  border-radius: 0;
}

.excel-grid,
.excel-header,
.grid-body {
  border-radius: 0;
}

.event-block,
.selection-box,
.move-ghost {
  border-radius: 0;
}

.excel-header {
  overflow: visible;
}

.head-cell.time-head {
  position: sticky;
  left: 0;
  z-index: 20;
  background: #fff4e9;
}

.time-column {
  position: sticky;
  left: 0;
  z-index: 12;
  width: var(--time-col);
  background: #fffaf5;
  box-shadow: 1px 0 0 var(--grid-line);
}

.time-column .time-label {
  position: absolute;
  left: 0;
  top: calc(var(--i) * var(--row-h));
  width: var(--time-col);
  height: var(--row-h);
  z-index: 13;
}

.grid-lines {
  left: var(--time-col);
}

.current-line {
  left: var(--time-col);
}

@media (max-width: 430px) {
  .sheet-wrap {
    width: 100%;
  }
}


/* v1.9: 엑셀식 시간 열 전체 고정 보정 */
.excel-scroll {
  position: relative;
}

.grid-body {
  overflow: visible !important;
}

.time-column {
  position: sticky !important;
  left: 0 !important;
  z-index: 40 !important;
  width: var(--time-col) !important;
  min-width: var(--time-col) !important;
  background: #fffaf5 !important;
  box-shadow: 1px 0 0 var(--grid-line);
  overflow: visible;
}

.time-column .time-label {
  position: absolute !important;
  left: 0 !important;
  width: var(--time-col) !important;
  min-width: var(--time-col) !important;
  background: #fffaf5 !important;
  z-index: 41 !important;
  text-align: center;
  padding: 0;
  white-space: nowrap;
  overflow: visible;
}

.head-cell.time-head {
  position: sticky !important;
  left: 0 !important;
  z-index: 60 !important;
  width: var(--time-col) !important;
  min-width: var(--time-col) !important;
  background: #fff4e9 !important;
  box-shadow: 1px 0 0 var(--grid-line);
}

.grid-lines {
  pointer-events: none;
}

/* 시간 열 위로 일정 선택 셀이 덮이지 않도록 날짜 영역은 시간열 뒤에서 시작 */
.grid-cell,
.event-block,
.selection-box,
.move-ghost {
  z-index: 5;
}

.event-block {
  z-index: 10;
}

.selection-box,
.move-ghost {
  z-index: 15;
}


#signupForm input[name="phone"]::placeholder {
  color: #aaa;
}


.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}


/* v1.10: 여행앨범 */
.album-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.album-icon {
  width: 15px;
  height: 12px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.album-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -5px;
  height: 3px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.album-card {
  border: 1px solid var(--line);
  background: #fbfaf8;
  border-radius: 16px;
  overflow: hidden;
}

.album-thumb {
  height: 110px;
  background: #f1ece6;
  display: grid;
  place-items: center;
  color: #8b8178;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  overflow: hidden;
}

.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-info {
  padding: 9px;
}

.album-info b {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-info small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.album-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.album-mini-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 7px 4px;
  color: #333;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  text-align: center;
}

.album-mini-btn.danger {
  color: var(--danger);
  background: #fff7f7;
}

.album-mini-btn.single {
  grid-column: 1 / -1;
}

.album-upload-box {
  border: 1px dashed var(--line);
  background: #fffaf5;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}


/* v1.11: Clean UI overhaul - white/blue, fixed planner chrome, readable timetable */
:root {
  --bg: #f5f7fb;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --grid-line: #eef2f7;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --blue-soft: #eff6ff;
  --green-soft: #ecfdf5;
  --yellow-soft: #fff7ed;
  --purple-soft: #f5f3ff;
  --gray-soft: #f3f4f6;
  --danger: #dc2626;
  --shadow: 0 10px 24px rgba(15, 23, 42, .08);
  --row-h: 40px;
  --time-col: 64px;
  --day-w: 172px;
}
html, body { background: #e5e7eb; }
.app { background: var(--bg); }
.home-hero, .auth-hero { background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%); }
.logo-mark { background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%); box-shadow: 0 12px 26px rgba(37,99,235,.24); }
.primary-btn { background: #111827; box-shadow: 0 10px 22px rgba(17,24,39,.13); }
.secondary-btn { background: #eef2f7; color: #1f2937; }
.text-btn, .action-chip, .open-btn, .view-mode-btn, .day-tab, .mode-label, .tiny-btn { box-shadow: none; }
.action-chip { background:#fff; border-color:#e5e7eb; color:#1f2937; }
.action-chip.primary, .day-tab.active { background:var(--primary-soft); color:var(--primary-dark); border-color:#bfdbfe; }
.open-btn { background:var(--primary); }
#plannerScreen.active {
  display: flex !important;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
  background: #f5f7fb;
}
.planner-top {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  z-index: 80;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(16px);
}
.planner-title b { color:#111827; font-size:17px; }
.planner-title span { color:#6b7280; }
.planner-actions {
  position: relative;
  flex: 0 0 auto;
  z-index: 70;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  gap: 8px;
}
.planner-actions .action-chip { border-radius:14px; padding:10px 13px; font-size:13px; }
.sheet-wrap {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}
.sheet-head { flex:0 0 auto; padding:13px 16px; background:#fff; border-bottom:1px solid #e5e7eb; }
.sheet-head b { font-size:16px; color:#111827; }
.sheet-head span { color:#64748b; font-size:13px; }
.excel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow: auto;
  background: #fff;
  border-radius: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(16px + var(--safe-bottom));
}
.excel-grid { background:#fff; }
.excel-header {
  height: 48px;
  position: sticky;
  top: 0;
  z-index: 55;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
.head-cell { background:#f8fafc; border-right:1px solid #e5e7eb; color:#111827; font-size:14px; }
.head-cell small { color:#64748b; font-size:10px; }
.head-cell.time-head { background:#f8fafc !important; z-index:70 !important; }
.grid-body { background:#fff; }
.grid-lines {
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row-h) - 1px), var(--grid-line) calc(var(--row-h) - 1px), var(--grid-line) var(--row-h)),
    repeating-linear-gradient(to right, transparent 0, transparent calc(var(--day-w) - 1px), var(--grid-line) calc(var(--day-w) - 1px), var(--grid-line) var(--day-w)) !important;
  background-color: #fff;
}
.time-column { background:#f8fafc !important; box-shadow:1px 0 0 #e5e7eb, 8px 0 14px rgba(15,23,42,.035); }
.time-column .time-label, .time-label { background:#f8fafc !important; color:#64748b; border-color:#e5e7eb !important; font-size:12px; font-weight:800; }
.grid-cell:hover { border-color:rgba(37,99,235,.24); background:rgba(37,99,235,.035); }
.selection-box { border-color:rgba(37,99,235,.86); background:rgba(37,99,235,.10); border-radius:4px; }
.event-block {
  border-radius: 4px;
  border: 1px solid rgba(15,23,42,.08);
  border-left: 4px solid rgba(37,99,235,.58);
  box-shadow: none;
  padding: 6px 8px;
}
.event-block.blue { background:#eff6ff; border-left-color:#2563eb; }
.event-block.green { background:#ecfdf5; border-left-color:#10b981; }
.event-block.yellow { background:#fff7ed; border-left-color:#f97316; }
.event-block.purple { background:#f5f3ff; border-left-color:#8b5cf6; }
.event-block.pink { background:#fdf2f8; border-left-color:#ec4899; }
.event-block.gray, .event-block.orange { background:#f8fafc; border-left-color:#64748b; }
.event-title { font-size:13px; line-height:1.2; color:#111827; letter-spacing:-.2px; }
.event-sub { margin-top:3px; color:#64748b; font-size:11px; line-height:1.25; }
.event-block.pressed { filter:brightness(.98); box-shadow:inset 0 0 0 999px rgba(15,23,42,.035); }
.move-ghost { border-radius:4px; border-color:rgba(37,99,235,.9); background:rgba(37,99,235,.10); }
.sheet { background:#fff; border-radius:24px 24px 0 0; }
.field input, .field textarea, .field select { background:#fff; border-color:#e5e7eb; }
.create-card, .auth-card, .trip-item { background:#fff; border-color:#e5e7eb; }
.excel-scroll, .sheet-head, .excel-header, .head-cell, .time-column, .time-label { color-scheme: light; }
@media (max-width:430px) {
  .planner-line { padding:0; }
  .text-btn { border-radius:14px; }
  .sheet-head { padding-left:14px; padding-right:14px; }
}


/* v1.12: 보기 모드 / 편집 모드 분리 */
.edit-toggle-btn {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

#plannerScreen.edit-mode .edit-toggle-btn {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.edit-mode-banner {
  flex: 0 0 auto;
  margin: 10px 14px 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.edit-mode-banner.hidden {
  display: none;
}

/* 보기 모드에서는 셀 오버레이가 터치를 잡지 않게 해서 카드 위/빈칸 모두 스크롤 가능 */
#plannerScreen:not(.edit-mode) .grid-cell {
  pointer-events: none !important;
}

#plannerScreen:not(.edit-mode) .event-block {
  touch-action: pan-x pan-y;
  cursor: pointer;
}

#plannerScreen.edit-mode .grid-cell {
  pointer-events: auto;
}

#plannerScreen.edit-mode .event-block {
  touch-action: none;
}

#plannerScreen:not(.edit-mode) .grid-cell:hover {
  border-color: transparent;
  background: transparent;
}

#plannerScreen.edit-mode .event-block::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(37, 99, 235, .28);
  pointer-events: none;
}

#plannerScreen.edit-mode .sheet-head b::after {
  content: " · 편집 중";
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.view-only-note {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 12px;
}

.sheet-actions.two-even {
  grid-template-columns: 1fr 1fr;
}


/* v1.13: 보기 모드 한눈 보기 최적화 */
#plannerScreen:not(.edit-mode) .sheet-head {
  padding-top: 10px;
  padding-bottom: 10px;
}

#plannerScreen:not(.edit-mode) .excel-header {
  height: 42px;
}

#plannerScreen:not(.edit-mode) .head-cell {
  font-size: 13px;
}

#plannerScreen:not(.edit-mode) .head-cell small {
  font-size: 9px;
}

#plannerScreen:not(.edit-mode) .time-label {
  font-size: 11px;
}

#plannerScreen:not(.edit-mode) .event-block {
  padding: 4px 6px;
  border-left-width: 3px;
  overflow: hidden;
}

#plannerScreen:not(.edit-mode) .event-title {
  display: block;
  font-size: 12px;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}

#plannerScreen:not(.edit-mode) .event-sub {
  display: none !important;
}

#plannerScreen:not(.edit-mode) .event-block.short .event-title,
#plannerScreen:not(.edit-mode) .event-block.medium .event-title {
  -webkit-line-clamp: unset;
}

#plannerScreen:not(.edit-mode) .planner-actions {
  padding-top: 8px;
  padding-bottom: 8px;
}

#plannerScreen:not(.edit-mode) .planner-actions .action-chip {
  padding: 9px 11px;
}

/* compact grid is for viewing. Edit mode keeps the larger operational grid. */
.excel-grid.compact-view .grid-lines {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      #eef2f7 calc(var(--row-h) - 1px),
      #eef2f7 var(--row-h)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-w) - 1px),
      #eef2f7 calc(var(--day-w) - 1px),
      #eef2f7 var(--day-w)
    ) !important;
}

.compact-view .event-block {
  min-height: 0;
}

/* 보기 모드에서는 시간표를 빠르게 훑어보는 용도로 맞춤 */
#plannerScreen:not(.edit-mode) .sheet-wrap {
  background: #fff;
}

#plannerScreen:not(.edit-mode) .excel-scroll {
  padding-bottom: 6px;
}

/* 편집 모드는 상세 정보와 큰 셀 유지 */
#plannerScreen.edit-mode .event-sub {
  display: -webkit-box;
}


/* v1.14: 팝업 최상단 레이어 / 강제 라이트 모드 */
:root {
  color-scheme: light !important;
}

html,
body,
.app,
.screen,
.sheet,
.sheet-backdrop,
.time-picker-backdrop,
.confirm-backdrop,
input,
textarea,
select,
button {
  color-scheme: light !important;
}

html,
body {
  background: #e5e7eb !important;
  color: #111827 !important;
}

.app,
.screen {
  color: #111827 !important;
}

/* 모바일/브라우저 다크모드가 form UI를 강제로 어둡게 바꾸는 것을 방지 */
input,
textarea,
select {
  background-color: #ffffff !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af;
}

/* bottom sheet가 sticky 날짜 헤더/상단바 아래에 깔리지 않도록 최상위 레이어로 고정 */
.sheet-backdrop {
  z-index: 5000 !important;
  background: rgba(15, 23, 42, .62) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sheet {
  position: relative;
  z-index: 5001 !important;
  background: #ffffff !important;
  color: #111827 !important;
}

/* 시간 선택/삭제 확인 모달도 항상 가장 위에 표시 */
.time-picker-backdrop {
  z-index: 5100 !important;
  background: rgba(15, 23, 42, .62) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.time-picker {
  position: relative;
  z-index: 5101 !important;
  background: #ffffff !important;
  color: #111827 !important;
}

.confirm-backdrop {
  z-index: 5200 !important;
  background: rgba(15, 23, 42, .62) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.confirm-box {
  position: relative;
  z-index: 5201 !important;
  background: #ffffff !important;
  color: #111827 !important;
}

/* 팝업이 뜬 상태에서는 sticky header가 시각적으로 튀어나오지 않도록 레이어 정리 */
.sheet-backdrop.active,
.time-picker-backdrop.active,
.confirm-backdrop.active {
  isolation: isolate;
}


/* v1.15: 시간축을 표 칸이 아니라 앱형 타임라인처럼 정리 */
:root {
  --time-bg: #f8fafc;
  --time-text: #64748b;
}

/* 시간 열은 엑셀 셀처럼 나뉘지 않게 단색 패널로 처리 */
.time-column {
  background: var(--time-bg) !important;
  box-shadow: 1px 0 0 #e5e7eb, 10px 0 18px rgba(15, 23, 42, .025) !important;
}

/* 06:00, 07:00 칸마다 그어지던 선 제거 */
.time-column .time-label,
.time-label {
  background: transparent !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  color: var(--time-text) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

/* 시간 헤더만 패널 상단으로 보이게 유지 */
.head-cell.time-head {
  background: var(--time-bg) !important;
  border-right: 1px solid #e5e7eb !important;
}

/* 날짜 영역의 격자도 더 약하게 해서 표 느낌 완화 */
.grid-lines {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      rgba(226, 232, 240, .62) calc(var(--row-h) - 1px),
      rgba(226, 232, 240, .62) var(--row-h)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-w) - 1px),
      rgba(226, 232, 240, .72) calc(var(--day-w) - 1px),
      rgba(226, 232, 240, .72) var(--day-w)
    ) !important;
}

/* 보기 모드에서는 더 카드/캘린더 느낌으로, 격자선을 한 단계 더 연하게 */
#plannerScreen:not(.edit-mode) .grid-lines {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      rgba(226, 232, 240, .42) calc(var(--row-h) - 1px),
      rgba(226, 232, 240, .42) var(--row-h)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-w) - 1px),
      rgba(226, 232, 240, .55) calc(var(--day-w) - 1px),
      rgba(226, 232, 240, .55) var(--day-w)
    ) !important;
}

/* 시간 열과 날짜 영역의 구분은 선 하나만 남김 */
.grid-body::before {
  content: "";
  position: sticky;
  left: var(--time-col);
  top: 0;
  z-index: 45;
  display: block;
  width: 1px;
  height: var(--grid-h);
  background: #e5e7eb;
  pointer-events: none;
}

/* 시간 숫자는 박스가 아니라 축 레이블처럼 보이게 살짝 위쪽 정렬 */
.time-column .time-label {
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: 4px !important;
}

/* 편집 모드에서는 조작 기준선이 필요하므로 날짜 영역 선은 보기 모드보다 조금 더 보이게 */
#plannerScreen.edit-mode .grid-lines {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      rgba(203, 213, 225, .66) calc(var(--row-h) - 1px),
      rgba(203, 213, 225, .66) var(--row-h)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-w) - 1px),
      rgba(203, 213, 225, .72) calc(var(--day-w) - 1px),
      rgba(203, 213, 225, .72) var(--day-w)
    ) !important;
}


/* v1.16: 시간 라벨 내려감 수정 / 날짜 헤더 남색 정리 / 날짜 경계선 완화 */

/* v1.15의 sticky 구분선 pseudo-element가 실제 레이아웃 높이를 차지해서
   시간 라벨이 아래로 밀리던 문제를 제거한다. */
.grid-body::before {
  content: none !important;
  display: none !important;
}

/* 시간 열 자체의 오른쪽 그림자로 날짜 영역과만 구분 */
.time-column {
  box-shadow: 1px 0 0 #e5e7eb, 8px 0 16px rgba(15, 23, 42, .035) !important;
}

/* 날짜 헤더는 경계선 없는 남색 바 형태로 변경 */
.excel-header {
  background: #0f172a !important;
  border-bottom: 0 !important;
}

.head-cell {
  border-right: 0 !important;
}

/* 시간 헤더는 시간축 패널과 연결되게 밝은 색 유지 */
.head-cell.time-head {
  background: #f8fafc !important;
  color: #334155 !important;
  border-right: 1px solid #e5e7eb !important;
}

/* 날짜 쪽 헤더만 남색 + 흰색 글자 */
.head-cell:not(.time-head) {
  background: #0f172a !important;
  color: #ffffff !important;
}

.head-cell:not(.time-head) small {
  color: rgba(255, 255, 255, .72) !important;
}

/* 날짜 컬럼 경계선은 없애고, 시간 가로 기준선만 아주 연하게 유지 */
#plannerScreen:not(.edit-mode) .grid-lines {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      rgba(226, 232, 240, .38) calc(var(--row-h) - 1px),
      rgba(226, 232, 240, .38) var(--row-h)
    ) !important;
}

/* 편집 모드는 드래그 기준이 필요하므로 날짜 경계선을 아주 약하게만 유지 */
#plannerScreen.edit-mode .grid-lines {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      rgba(203, 213, 225, .58) calc(var(--row-h) - 1px),
      rgba(203, 213, 225, .58) var(--row-h)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-w) - 1px),
      rgba(203, 213, 225, .32) calc(var(--day-w) - 1px),
      rgba(203, 213, 225, .32) var(--day-w)
    ) !important;
}

/* 날짜 칸 구분선이 사라져도 컬럼 감각이 완전히 죽지 않도록 보기 모드에 아주 약한 컬럼 톤만 준다. */
#plannerScreen:not(.edit-mode) .grid-lines {
  background-color: #ffffff !important;
}

/* 헤더와 본문 사이만 명확히 구분 */
.excel-header {
  box-shadow: 0 1px 0 rgba(15, 23, 42, .08);
}


/* v1.17: 날짜 헤더를 편집 버튼과 맞춘 파란색 계열로 변경 */
.excel-header {
  background: #2563eb !important;
  border-bottom: 0 !important;
}

.head-cell:not(.time-head) {
  background: #2563eb !important;
  color: #ffffff !important;
}

.head-cell:not(.time-head) small {
  color: rgba(255, 255, 255, .78) !important;
}

/* 파란 헤더가 너무 떠 보이지 않도록 아래쪽만 얇은 음영 */
.excel-header {
  box-shadow: 0 1px 0 rgba(37, 99, 235, .22), 0 6px 14px rgba(37, 99, 235, .08);
}

/* 시간 헤더는 시간축과 연결되는 고정 패널이라 밝은 색 유지 */
.head-cell.time-head {
  background: #f8fafc !important;
  color: #334155 !important;
  border-right: 1px solid #e5e7eb !important;
}


/* v1.18: 현재 시간대 일정 강조 */
.event-block.now-active {
  border-color: #f59e0b !important;
  border-left-color: #f59e0b !important;
  box-shadow:
    0 0 0 2px rgba(245, 158, 11, .85),
    0 0 18px rgba(245, 158, 11, .34) !important;
  animation: currentScheduleGlow 1.8s ease-in-out infinite;
}

.event-block.now-active::after {
  content: "현재";
  position: absolute;
  right: 5px;
  top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -.2px;
}

@keyframes currentScheduleGlow {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(245, 158, 11, .76),
      0 0 14px rgba(245, 158, 11, .24);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(245, 158, 11, .95),
      0 0 24px rgba(245, 158, 11, .44);
  }
}

.head-cell.today-head {
  background: #1d4ed8 !important;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .28);
}

.head-cell.today-head small::after {
  content: " · 오늘";
  color: rgba(255,255,255,.9);
}

/* 편집 모드에서는 조작 방해가 덜 되도록 현재 표시를 조금 얌전하게 */
#plannerScreen.edit-mode .event-block.now-active {
  animation: none;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .7) !important;
}


/* v1.19: 오늘 날짜 보정 / 현재 시간선 파란색 / 현재 일정 카드 발광 강화 */

/* 현재 시간선은 카드보다 위에 보이는 형광 연파랑 계열 */
.current-line.active {
  z-index: 95 !important;
  height: 2px !important;
  background: #67e8f9 !important;
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, .44),
    0 0 14px rgba(103, 232, 249, .88),
    0 0 28px rgba(37, 99, 235, .34) !important;
  pointer-events: none;
}

.current-line.active::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #67e8f9;
  box-shadow: 0 0 14px rgba(103, 232, 249, .92);
}

/* 기존 빨간 current line 스타일이 남아있어도 덮어쓰기 */
.current-line {
  border: 0 !important;
}

/* 현재 일정 카드는 선보다 더 명확하게 파란 발광 테두리 */
.event-block.now-active {
  z-index: 80 !important;
  border-color: #38bdf8 !important;
  border-left-color: #2563eb !important;
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, .92),
    0 0 18px rgba(56, 189, 248, .52),
    0 0 34px rgba(37, 99, 235, .22) !important;
  animation: currentScheduleBlueGlow 1.8s ease-in-out infinite !important;
}

.event-block.now-active::after {
  background: #2563eb !important;
  color: #ffffff !important;
}

@keyframes currentScheduleBlueGlow {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(56, 189, 248, .76),
      0 0 14px rgba(56, 189, 248, .34),
      0 0 28px rgba(37, 99, 235, .16);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(103, 232, 249, .98),
      0 0 24px rgba(56, 189, 248, .62),
      0 0 42px rgba(37, 99, 235, .28);
  }
}

/* 편집 모드에서는 조작 방해를 줄이되 현재 일정 식별은 유지 */
#plannerScreen.edit-mode .event-block.now-active {
  animation: none !important;
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, .82),
    0 0 14px rgba(56, 189, 248, .28) !important;
}


/* v1.20: 현재 일정 강조 은은하게 / 현재 시간선은 시간축에만 표시 */

/* 전체 시간표를 가로지르는 형광선 제거.
   현재 시간은 왼쪽 시간축에 짧은 시계침 느낌으로만 표시한다. */
.current-line.active {
  left: 0 !important;
  width: var(--time-col) !important;
  height: 2px !important;
  z-index: 96 !important;
  background: #38bdf8 !important;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, .18),
    0 0 8px rgba(56, 189, 248, .34) !important;
  pointer-events: none;
}

.current-line.active::before {
  content: "";
  position: absolute;
  right: -5px;
  left: auto !important;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, .18),
    0 0 10px rgba(56, 189, 248, .34);
}

.current-line.active::after {
  content: "현재";
  position: absolute;
  left: 8px;
  top: -18px;
  color: #0284c7;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -.2px;
}

/* 현재 일정 카드는 강한 발광 대신 은은한 음영과 얇은 테두리만 사용 */
.event-block.now-active {
  z-index: 30 !important;
  border-color: #7dd3fc !important;
  border-left-color: #0284c7 !important;
  background: #f0f9ff !important;
  box-shadow:
    0 0 0 1px rgba(14, 165, 233, .30),
    0 8px 18px rgba(14, 165, 233, .12) !important;
  animation: none !important;
}

.event-block.now-active::after {
  content: "현재";
  position: absolute;
  right: 5px;
  top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -.2px;
}

/* v1.19 발광 애니메이션 정의가 남아 있어도 사용하지 않음 */
@keyframes currentScheduleBlueGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(14, 165, 233, .30),
      0 8px 18px rgba(14, 165, 233, .12);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(14, 165, 233, .30),
      0 8px 18px rgba(14, 165, 233, .12);
  }
}

#plannerScreen.edit-mode .event-block.now-active {
  animation: none !important;
  box-shadow:
    0 0 0 1px rgba(14, 165, 233, .28),
    0 6px 14px rgba(14, 165, 233, .10) !important;
}

/* 시간축 현재 위치가 시간 열 위에서 더 자연스럽게 보이도록 */
.time-column {
  position: sticky !important;
  left: 0 !important;
  z-index: 45 !important;
}


/* v1.20.1: WebView 첫 진입 시 화면 높이 즉시 반영 */
:root {
  --app-vh: 100dvh;
}

#plannerScreen.active {
  height: var(--app-vh) !important;
  min-height: var(--app-vh) !important;
}

/* 계산 안정화를 위해 시간표 스크롤 영역은 flex 높이를 명확히 유지 */
#plannerScreen.active .sheet-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

#plannerScreen.active .excel-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}


/* v1.20.2: 보기/편집 모드별 상단 액션 분리
   - 보기 모드: 여행앨범, 자료함, 여행자
   - 편집 모드: 공유설정, 설정 */
.planner-actions .edit-action {
  display: none;
}

.planner-actions .view-action {
  display: inline-flex;
}

#plannerScreen.edit-mode .planner-actions .view-action {
  display: none;
}

#plannerScreen.edit-mode .planner-actions .edit-action {
  display: inline-flex;
}

/* 편집 모드 액션은 편집 버튼과 같은 파란 톤으로 정리 */
#plannerScreen.edit-mode .planner-actions .edit-action {
  border-color: rgba(37, 99, 235, .22);
  background: #eff6ff;
  color: #1d4ed8;
}


/* v1.20.3: 여행앨범 전체 화면 / 사진 전용 3열 썸네일 */
.album-screen {
  background: #f5f7fb;
  min-height: var(--app-vh, 100vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(18px + var(--safe-bottom));
}

.album-page-top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background: rgba(245, 247, 251, .96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}

.album-page-content {
  padding: 14px 14px 22px;
}

.album-upload-panel {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.album-upload-panel b {
  display: block;
  font-size: 17px;
  letter-spacing: -.4px;
}

.album-upload-panel p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.album-page-upload {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.album-page-upload .file-input {
  min-width: 0;
  border-radius: 14px;
  background: #f8fafc;
}

.album-readonly-note {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
}

.album-thumb-section {
  margin-top: 14px;
}

.album-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 9px;
}

.album-section-head b {
  font-size: 14px;
}

.album-section-head span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.album-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.album-tile {
  min-width: 0;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .05);
}

.album-tile-photo {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: #e0f2fe;
  overflow: hidden;
}

.album-tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-tile-info {
  padding: 7px 7px 2px;
}

.album-tile-info span {
  display: block;
  max-width: 100%;
  color: #0f172a;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-tile-info small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-tile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
}

.album-tile-actions a,
.album-tile-actions button {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  color: #2563eb;
  padding: 6px 2px;
  text-align: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  text-decoration: none;
}

.album-tile-actions button {
  color: #dc2626;
  background: #fff7f7;
}

.album-tile-actions a:only-child {
  grid-column: 1 / -1;
}

.album-empty-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 180px;
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
  background: #ffffff;
  color: #64748b;
  text-align: center;
}

.album-empty-card b {
  color: #0f172a;
}

.album-empty-card span {
  font-size: 12px;
}

/* 기존 앨범 카드가 다른 곳에서 호출될 경우에도 사진 중심 3열로 정리 */
.album-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.album-thumb {
  aspect-ratio: 1 / 1;
  height: auto;
}


/* v1.20.4: 앨범 미디어/선택/미리보기 개선 */
.album-section-head > div:first-child {
  display: grid;
  gap: 2px;
}

.album-mode-actions button,
.album-select-bar button {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 950;
}

.album-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: sticky;
  top: calc(58px + var(--safe-top));
  z-index: 20;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: rgba(239, 246, 255, .96);
  backdrop-filter: blur(12px);
}

.album-select-bar b {
  color: #1d4ed8;
  font-size: 12px;
}

.album-select-bar div {
  display: flex;
  gap: 6px;
}

.album-select-bar button:disabled {
  opacity: .4;
}

.album-tile {
  position: relative;
}

.album-tile.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .22), 0 10px 20px rgba(37, 99, 235, .12);
}

.album-check {
  position: absolute;
  z-index: 5;
  top: 6px;
  left: 6px;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 999px;
  background: rgba(15, 23, 42, .42);
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .2);
}

.album-tile.selected .album-check {
  background: #2563eb;
}

.album-tile-photo {
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.album-tile-photo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

.media-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #ffffff;
  font-size: 9px;
  font-weight: 950;
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: #020617;
  color: #ffffff;
  padding: var(--safe-top) 0 var(--safe-bottom);
}

.media-viewer.active {
  display: grid;
  grid-template-rows: auto 1fr;
}

.media-viewer-top {
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(2, 6, 23, .88);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.media-viewer-top button,
.media-viewer-top a {
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #ffffff;
  padding: 8px 8px;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
}

.media-viewer-top div {
  min-width: 0;
  text-align: center;
}

.media-viewer-top b,
.media-viewer-top span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-viewer-top b {
  font-size: 13px;
}

.media-viewer-top span {
  margin-top: 2px;
  color: rgba(255,255,255,.65);
  font-size: 11px;
}

.media-viewer-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px;
}

.media-viewer-stage img,
.media-viewer-stage video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.media-viewer-stage video {
  width: 100%;
  max-height: 100%;
  background: #000;
}

.media-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #ffffff;
  font-size: 38px;
  font-weight: 300;
}

.media-nav:disabled {
  opacity: .18;
}

.media-prev {
  left: 10px;
}

.media-next {
  right: 10px;
}


/* v1.20.5: 모바일 편집 제스처 정리
   - 빈 칸: 터치 즉시 선택이 아니라 길게 누른 뒤 드래그 선택
   - 일정 카드: 일반 터치/드래그는 스크롤, 길게 누른 뒤에만 이동 */
.grid-cell.pressing-cell {
  background: rgba(37, 99, 235, .08) !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .22);
}

/* 카드 위에서 손가락으로 스크롤 가능하게 기존 touch-action:none을 덮어씀 */
.event-block {
  touch-action: pan-x pan-y !important;
}

/* 실제 선택/이동이 시작된 순간에만 스크롤 제스처를 잠금 */
.excel-scroll.selecting {
  user-select: none;
  touch-action: none;
}

.move-ghost,
.selection-box {
  pointer-events: none;
}


/* v1.20.6: 현재시간 침 고정/축소 + 모바일 긴누름 드래그 보강 */

/* 현재시간 침은 sticky 시간축 안에 있으므로 가로 스크롤에 밀리지 않음 */
.time-column .current-line.active {
  left: 0 !important;
  width: calc(var(--time-col) - 10px) !important;
  height: 1.5px !important;
  z-index: 96 !important;
  background: #7dd3fc !important;
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, .14),
    0 0 5px rgba(125, 211, 252, .24) !important;
}

.time-column .current-line.active::before {
  right: -3px !important;
  left: auto !important;
  top: -3px !important;
  width: 7px !important;
  height: 7px !important;
  background: #38bdf8 !important;
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, .12),
    0 0 6px rgba(56, 189, 248, .22) !important;
}

.time-column .current-line.active::after {
  display: none !important;
}

/* 기존 current-line 폭/발광이 남아 있어도 시간축 안에서는 얌전하게 제한 */
.current-line.active {
  max-width: calc(var(--time-col) - 10px);
}

/* 모바일에서 길게누른 뒤 선택이 시작된 순간부터 브라우저 스크롤을 확실히 차단 */
body.touch-selecting,
body.touch-selecting .excel-scroll,
body.touch-selecting .grid-body,
body.touch-selecting .grid-cell {
  overscroll-behavior: contain;
  touch-action: none !important;
}

/* 빈 칸 길게누르기 대기 상태 표시 */
.grid-cell.pressing-cell {
  background: rgba(37, 99, 235, .10) !important;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .20);
}

/* 일정 카드는 일반 터치 스크롤 허용. 길게눌러 이동이 시작된 뒤에만 스크롤 잠금 */
.event-block {
  touch-action: pan-x pan-y !important;
}


/* v1.20.7: 업로드 UI 단순화 / 상세 팝업 액션 정리 */
.sheet-actions.only-close {
  grid-template-columns: 1fr;
}

.upload-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.hidden-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-choose-btn,
.upload-submit-btn {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.upload-choose-btn {
  background: #eff6ff;
  color: #2563eb;
}

.upload-submit-btn {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, .18);
}

.upload-status {
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-page-upload {
  display: block !important;
}

.album-page-upload .upload-control {
  margin-top: 12px;
}

@media (max-width: 420px) {
  .upload-control {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
  }

  .upload-choose-btn,
  .upload-submit-btn {
    padding: 9px 10px;
    font-size: 11px;
  }

  .upload-status {
    font-size: 11px;
  }
}


/* v1.20.8: 일정 첨부 이미지/영상 썸네일 + 화면맞춤 미리보기 */
.attach-media-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.attach-card.media-attach-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  min-height: 88px;
}

.attach-thumb {
  position: relative;
  width: 74px;
  height: 74px;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #eef6ff;
  padding: 0;
}

.attach-thumb img,
.attach-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f172a;
}

.attach-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.attach-title-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 0;
  color: #0f172a;
  text-align: left;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attach-delete-btn {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 4px 0;
}

.library-preview-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #2563eb;
  text-align: left;
  font: inherit;
  font-weight: 950;
  text-decoration: underline;
}

.media-viewer-stage img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100vh - 118px - var(--safe-top) - var(--safe-bottom)) !important;
  object-fit: contain !important;
}

.media-viewer-stage video {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100vh - 118px - var(--safe-top) - var(--safe-bottom)) !important;
  object-fit: contain !important;
}

@media (max-width: 420px) {
  .attach-media-row {
    grid-template-columns: 1fr;
  }

  .attach-card.media-attach-card {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 82px;
  }

  .attach-thumb {
    width: 68px;
    height: 68px;
  }
}


/* v1.20.9: 공유 일정 자동 동기화 */
.sync-note {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}


/* v1.21.0: 여행자 화면에서는 편집 버튼 숨김 */
.edit-toggle-btn.hidden {
  display: none !important;
}


/* v1.21.1: 일정 카드/색상/링크/앨범 제거 UI 정리 */
.event-block.white {
  background: #ffffff !important;
}

.event-block.lightgray {
  background: #f1f5f9 !important;
}

.event-block.red {
  background: #fee2e2 !important;
}

.event-block.yellow {
  background: #fef3c7 !important;
}

.event-block.green {
  background: #dcfce7 !important;
}

.event-block.blue {
  background: #dbeafe !important;
}

.event-block.purple {
  background: #ede9fe !important;
}

/* 이전 색상 데이터 보정 */
.event-block.orange {
  background: #ffffff !important;
}

.event-block.pink {
  background: #fee2e2 !important;
}

.event-block.gray {
  background: #f1f5f9 !important;
}

.event-title {
  display: block !important;
  text-align: center;
  color: #111827;
  margin-bottom: 2px;
}

.event-block.title-red .event-title {
  color: #dc2626 !important;
}

.event-block.title-black .event-title {
  color: #111827 !important;
}

.event-time,
.event-place,
.event-memo,
.event-attach {
  display: block;
  text-align: left;
  color: #475569;
  font-size: 9px;
  line-height: 1.18;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-memo {
  color: #64748b;
}

.event-attach {
  color: #2563eb;
}

.event-block.short .event-time,
.event-block.short .event-place,
.event-block.short .event-memo,
.event-block.short .event-attach {
  display: none;
}

.event-block.medium .event-memo,
.event-block.medium .event-attach {
  display: none;
}

.color-choice.white {
  background: #ffffff;
}

.color-choice.lightgray {
  background: #f1f5f9;
}

.color-choice.red {
  background: #fee2e2;
}

.color-choice.yellow {
  background: #fef3c7;
}

.color-choice.green {
  background: #dcfce7;
}

.color-choice.blue {
  background: #dbeafe;
}

.color-choice.purple {
  background: #ede9fe;
}

.title-color-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.title-color-choice {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 950;
}

.title-color-choice.red {
  color: #dc2626;
}

.title-color-choice.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.link-open-card {
  display: block;
  border: 1px solid #dbeafe;
  border-radius: 15px;
  background: #eff6ff;
  color: #2563eb;
  padding: 13px 12px;
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
  text-align: center;
}

.album-chip,
.album-screen {
  display: none !important;
}


/* v1.21.2: 시간/위치 숨김, 메모 줄바꿈 표시 */
.event-time,
.event-place,
.event-attach {
  display: none !important;
}

.event-memo {
  display: block !important;
  margin-top: 3px;
  text-align: left !important;
  color: #475569;
  font-size: 9.5px;
  line-height: 1.18;
  font-weight: 850;
  white-space: pre-line !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow: hidden;
  text-overflow: clip;
}

.event-block.short .event-memo {
  display: none !important;
}

.event-block.medium .event-memo {
  display: block !important;
  -webkit-line-clamp: unset !important;
}

.event-title {
  text-align: center !important;
}
