/* ===== YUSUKE NOTE — Neon Diner Edition ===== */

:root {
  --bg:          #0B0E2E;
  --neon-pink:   #FF52A4;
  --neon-cyan:   #22D3EE;
  --neon-gold:   #FFD43A;
  --card:        rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.15);
  --accent:      #22D3EE;
  --accent2:     #1ab8d4;
  --glow:        rgba(34,211,238,0.15);
  --text:        #fff;
  --text-sub:    rgba(255,255,255,0.5);
  --input-bg:    rgba(255,255,255,0.05);
  --tab-active:  rgba(34,211,238,0.15);
  --tab-text:    #22D3EE;
  --check-color: #22D3EE;
  --btn-color:   #FF52A4;
  --btn-color2:  #FF3B7C;
  --group-head-bg: linear-gradient(to right, rgba(255,82,164,0.25), rgba(255,82,164,0.08));
  --group-head-border: rgba(255,82,164,0.35);
  --cat-color:   #FF52A4;
}

body[data-category="work"] {
  --accent:      #FF52A4;
  --accent2:     #FF3B7C;
  --glow:        rgba(255,82,164,0.15);
  --tab-active:  rgba(255,82,164,0.15);
  --tab-text:    #FF52A4;
  --check-color: #22D3EE;
  --btn-color:   #FF52A4;
  --btn-color2:  #FF3B7C;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== BODY ===== */
body {
  font-family: 'Noto Sans JP', -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  background-color: #0B0E2E;
  background-image:
    radial-gradient(ellipse at top,    rgba(255,82,164,0.12) 0%, transparent 45%),
    radial-gradient(ellipse at bottom, rgba(34,211,238,0.10) 0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
  transition: none;
}

.app-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 14px 32px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
}

/* ===== SAFE AREA (iPhone notch) ===== */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0px);
  background-color: #0B0E2E;
  z-index: 999;
}

/* ===== HEADER ===== */
/* sticky-nav に sticky を移譲。ヘッダー＋メインタブ＋サブタブを丸ごと上部固定 */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background-color: #0B0E2E;
  padding-bottom: 4px;
}
.app-header {
  background-color: #0B0E2E;
  padding-bottom: 10px;
}

/* Home: 備忘サブタブを非表示（Homeはタスクのみ運用） */
body[data-category="home"] .sub-tab[data-section="memo"] { display: none; }
body[data-category="home"] #section-memo { display: none !important; }
body[data-category="home"] .sub-tab[data-section="task"] { flex: 1; }

/* ---- Marquee Sign ---- */
@keyframes blinkGold {
  0%,100% { opacity:1; box-shadow:0 0 4px #FFD43A, 0 0 8px rgba(255,212,58,0.5); }
  50%      { opacity:0.2; box-shadow:none; }
}
@keyframes blinkPink {
  0%,100% { opacity:1; box-shadow:0 0 4px #FF52A4, 0 0 8px rgba(255,82,164,0.5); }
  50%      { opacity:0.2; box-shadow:none; }
}

.marquee-sign {
  background: rgba(13,16,53,0.9);
  border: 1.5px solid #FFD43A;
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 10px;
  box-shadow:
    0 0 0 3px rgba(255,212,58,0.1),
    0 0 16px rgba(255,212,58,0.25),
    0 0 32px rgba(255,82,164,0.15);
}
.bulbs-row {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}
.bulbs-top  { margin-bottom: 5px; }
.bulbs-bottom { margin-top: 5px; }
.bulb {
  width: 7px; height: 7px; border-radius: 50%;
}
.b-gold {
  background: #FFD43A;
  box-shadow: 0 0 4px #FFD43A, 0 0 8px rgba(255,212,58,0.5);
}
.b-gold:nth-child(2n)  { animation: blinkGold 1.4s ease-in-out infinite; }
.b-gold:nth-child(3n)  { animation: blinkGold 1.4s ease-in-out 0.47s infinite; }
.b-gold:nth-child(5n)  { animation: blinkGold 1.4s ease-in-out 0.93s infinite; }
.b-pink {
  background: #FF52A4;
  box-shadow: 0 0 4px #FF52A4, 0 0 8px rgba(255,82,164,0.5);
}
.b-pink:nth-child(2n)  { animation: blinkPink 1.2s ease-in-out 0.2s infinite; }
.b-pink:nth-child(3n)  { animation: blinkPink 1.2s ease-in-out 0.6s infinite; }
.b-pink:nth-child(5n)  { animation: blinkPink 1.2s ease-in-out 1.0s infinite; }
.marquee-inner { line-height: 0; }

/* ---- Neon Title ---- */
.neon-header {
  text-align: center;
  padding: 12px 12px 8px;
  position: relative;
  background: radial-gradient(ellipse at center, rgba(255,82,164,0.10) 0%, transparent 70%);
  border-radius: 12px;
  border: 1px solid rgba(255,82,164,0.18);
  margin-bottom: 8px;
}
.neon-tag {
  font-family: 'Racing Sans One', sans-serif;
  font-size: 10px; letter-spacing: 5px;
  color: #22D3EE;
  text-shadow: 0 0 8px #22D3EE, 0 0 16px rgba(34,211,238,0.5);
  margin-bottom: 3px;
  display: block;
}
.neon-ttl {
  font-family: 'Monoton', cursive;
  font-size: 36px; line-height: 1;
  color: #fff;
  text-shadow:
    0 0 4px #fff,
    0 0 10px #FF52A4,
    0 0 22px #FF52A4,
    0 0 44px #FF52A4,
    0 0 70px rgba(255,82,164,0.5);
  display: block;
}
.neon-sub {
  font-family: 'Racing Sans One', sans-serif;
  font-size: 12px; letter-spacing: 4px;
  color: #FFD43A;
  text-shadow: 0 0 6px #FFD43A, 0 0 12px rgba(255,212,58,0.5);
  margin-top: 4px;
  display: block;
}
/* Neon side bars */
.neon-header::before, .neon-header::after {
  content: "";
  position: absolute; top: 50%;
  width: 20px; height: 2px;
  background: #FF52A4;
  box-shadow: 0 0 8px #FF52A4, 0 0 16px #FF52A4;
}
.neon-header::before { left: 0; }
.neon-header::after  { right: 0; }

/* ---- Alien Mascots ---- */
.alien-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 6px;
}

/* ---- Category label & Sync (JS-controlled) ---- */
.category-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--glow);
  border: 1px solid var(--card-border);
  margin: 0 auto 4px;
  width: fit-content;
  display: flex;
  justify-content: center;
}
.category-icon { font-size: 13px; }
.category-text {
  font-family: 'Racing Sans One', sans-serif;
  font-size: 11px; letter-spacing: 3px;
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent);
  text-transform: uppercase;
}
.sync-status {
  font-size: 9px; text-align: center;
  letter-spacing: 0.5px; min-height: 12px;
  color: rgba(34,211,238,0.5);
}
.sync-ok   { color: #22D3EE; }
.sync-warn { color: #FFD43A; }

/* ---- Settings button ---- */
.btn-settings {
  position: absolute; right: 10px; top: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  padding: 8px; cursor: pointer; border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  z-index: 101;
  display: flex; align-items: center; justify-content: center;
}
.btn-settings:active { color: #22D3EE; background: rgba(34,211,238,0.15); border-color: #22D3EE; }

/* ===== MAIN TABS ===== */
.main-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.main-tab {
  flex: 1;
  padding: 12px 8px 10px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}
.tab-emoji  { font-size: 18px; margin-bottom: 2px; transition: transform 0.3s; }
.tab-name   {
  font-family: 'Monoton', cursive;
  font-size: 13px; letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  transition: all 0.3s;
}
.tab-jp { font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.3); transition: all 0.3s; }

/* Work active */
body[data-category="work"] .main-tab[data-category="work"].active {
  background: rgba(255,82,164,0.15);
  border-color: #FF52A4;
  box-shadow: 0 0 14px rgba(255,82,164,0.45), inset 0 0 14px rgba(255,82,164,0.08);
}
body[data-category="work"] .main-tab[data-category="work"].active .tab-name {
  color: #fff;
  text-shadow: 0 0 6px #FF52A4, 0 0 14px #FF52A4;
}
body[data-category="work"] .main-tab[data-category="work"].active .tab-jp { color: rgba(255,82,164,0.8); }
body[data-category="work"] .main-tab[data-category="work"].active .tab-emoji { transform: scale(1.15); }

/* Home active */
body[data-category="home"] .main-tab[data-category="home"].active {
  background: rgba(34,211,238,0.15);
  border-color: #22D3EE;
  box-shadow: 0 0 14px rgba(34,211,238,0.45), inset 0 0 14px rgba(34,211,238,0.08);
}
body[data-category="home"] .main-tab[data-category="home"].active .tab-name {
  color: #fff;
  text-shadow: 0 0 6px #22D3EE, 0 0 14px #22D3EE;
}
body[data-category="home"] .main-tab[data-category="home"].active .tab-jp { color: rgba(34,211,238,0.8); }
body[data-category="home"] .main-tab[data-category="home"].active .tab-emoji { transform: scale(1.15); }

/* ===== SUB TABS ===== */
.sub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  overflow: hidden;
}
.sub-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  font-family: 'Racing Sans One', sans-serif;
  font-size: 12px; letter-spacing: 3px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  -webkit-tap-highlight-color: transparent;
  min-height: 42px;
  transition: all 0.2s;
}
.sub-tab:last-child { border-right: none; }
.sub-icon { width: 14px; height: 14px; flex-shrink: 0; }
.sub-tab.active {
  background: var(--tab-active);
  color: var(--tab-text);
  text-shadow: 0 0 6px var(--tab-text);
}

/* ===== CONTENT ===== */
.content-section { display: none; }
.content-section.active { display: block; animation: fadeUp 0.3s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== INPUT AREA ===== */
.input-area {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,212,58,0.45);
  border-radius: 12px;
  padding: 14px 10px 12px;
  margin-bottom: 14px;
  box-shadow: 0 0 10px rgba(255,212,58,0.12);
  position: relative;
}
.input-area::before {
  content: "★ ORDER";
  position: absolute; top: -9px; left: 14px;
  background: #0B0E2E;
  color: #FFD43A;
  padding: 0 8px;
  font-family: 'Racing Sans One', sans-serif;
  font-size: 10px; letter-spacing: 3px;
  text-shadow: 0 0 6px #FFD43A;
}

.input-row-inline {
  display: flex; gap: 6px; align-items: center;
}
.input-field {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  font-size: 14px; font-family: inherit;
  color: #fff;
  background: rgba(255,255,255,0.05);
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field::placeholder { color: rgba(255,255,255,0.3); }
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
.input-minor { font-size: 13px; padding: 9px 10px; }

.input-select {
  padding: 9px 28px 9px 10px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  font-size: 13px; font-family: inherit; font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2322D3EE' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  outline: none;
  min-width: 100px; max-width: 140px;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s;
}
.input-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.input-select option { background: #1a1e3a; color: #fff; }

.btn-add-inline {
  width: 42px; height: 42px; min-width: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF52A4 0%, #FF3B7C 100%);
  color: #fff;
  border: 1.5px solid rgba(255,82,164,0.6);
  font-family: 'Racing Sans One', sans-serif;
  font-size: 22px;
  box-shadow: 0 0 10px rgba(255,82,164,0.45);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.btn-add-inline:active { transform: scale(0.94); opacity: 0.85; }

/* ===== ITEM LIST ===== */
.item-list { display: flex; flex-direction: column; gap: 6px; }

/* ===== GROUP HEADER ===== */
.group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: linear-gradient(to right, rgba(255,82,164,0.22), rgba(255,82,164,0.07));
  border: 1px solid rgba(255,82,164,0.3);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 1px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}
.group-header:active { background: rgba(255,82,164,0.3); }
.group-arrow { font-size: 9px; color: #FFD43A; min-width: 10px; }
.group-name {
  font-family: 'Racing Sans One', sans-serif;
  font-size: 13px; letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 6px rgba(255,82,164,0.5);
  flex: 1;
}
.group-count {
  background: #FFD43A; color: #0B0E2E;
  padding: 1px 10px; border-radius: 10px;
  font-family: 'Racing Sans One', sans-serif;
  font-size: 10px;
  box-shadow: 0 0 6px rgba(255,212,58,0.4);
}
.group-body { margin-bottom: 6px; }

/* ===== COMPACT ROW ===== */
.compact-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
  min-height: 32px;
  cursor: pointer;
}
.compact-row.expanded { flex-wrap: wrap; }
.compact-row.expanded .compact-detail {
  white-space: normal; word-break: break-word; overflow: visible;
}
.compact-row:last-child { border-bottom: none; }
.compact-row:active { background: rgba(255,255,255,0.03); }
.compact-row.checked { opacity: 0.35; }
.compact-row.checked .compact-left,
.compact-row.checked .compact-detail {
  text-decoration: line-through;
  color: var(--text-sub);
}

/* Compact checkbox */
.compact-cb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; min-width: 16px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  background: rgba(255,255,255,0.05);
  transition: all 0.2s;
}
.compact-cb:checked {
  background: #22D3EE;
  border-color: #22D3EE;
  box-shadow: 0 0 6px rgba(34,211,238,0.7);
}
.compact-cb:checked::after {
  content: '';
  position: absolute; left: 3px; top: 0px;
  width: 4px; height: 8px;
  border: solid #0B0E2E; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.compact-left {
  font-family: 'Racing Sans One', sans-serif;
  font-size: 10px; letter-spacing: 1px;
  color: #FF52A4;
  text-shadow: 0 0 4px rgba(255,82,164,0.4);
  min-width: 50px; max-width: 100px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.compact-right {
  flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0;
}
.compact-detail {
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; line-height: 1.4;
}
.photo-indicator {
  font-size: 10px; color: #22D3EE; cursor: pointer;
  white-space: nowrap; padding: 2px 4px;
  border-radius: 4px; background: rgba(34,211,238,0.08);
}
.compact-acts { display: flex; gap: 2px; align-items: center; }
.compact-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.35);
  font-size: 12px; cursor: pointer;
  padding: 3px 5px; border-radius: 4px;
  min-width: 24px; min-height: 24px;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.compact-btn:active { background: rgba(34,211,238,0.12); color: #22D3EE; }
.compact-del:active  { color: #ff6b6b; background: rgba(255,107,107,0.12); }

/* ===== ITEM CARD (full card mode) ===== */
.item-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
  display: flex; align-items: flex-start; gap: 10px;
  transition: all 0.2s;
}
.item-card.checked { opacity: 0.35; }
.item-card.checked .item-text { text-decoration: line-through; color: var(--text-sub); }

.item-checkbox {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; min-width: 22px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 5px; cursor: pointer;
  position: relative; margin-top: 1px;
  background: rgba(255,255,255,0.04);
  transition: all 0.2s;
}
.item-checkbox:checked {
  background: #22D3EE;
  border-color: #22D3EE;
  box-shadow: 0 0 8px rgba(34,211,238,0.7);
}
.item-checkbox:checked::after {
  content: '';
  position: absolute; left: 6px; top: 2px;
  width: 6px; height: 11px;
  border: solid #0B0E2E; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.item-content { flex: 1; min-width: 0; }
.item-major { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; }
.item-minor { font-size: 12px; color: var(--text-sub); line-height: 1.4; margin-top: 2px; }

.item-actions { display: flex; gap: 2px; align-items: center; }
.btn-icon {
  background: none; border: none;
  color: rgba(255,255,255,0.35); cursor: pointer;
  padding: 8px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; min-width: 36px; min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.btn-icon:active { background: rgba(34,211,238,0.12); color: #22D3EE; }
.btn-icon.btn-delete:active { color: #ff6b6b; background: rgba(255,107,107,0.12); }

/* ===== PHOTO GRID ===== */
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-thumb-wrap { position: relative; width: 56px; }
.photo-thumb {
  width: 56px; height: 56px; object-fit: cover;
  border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(34,211,238,0.3);
}
.photo-thumb-del {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px;
  background: #ff6b6b; color: #fff;
  border: 2px solid rgba(0,0,0,0.3);
  border-radius: 50%; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.photo-comment-tag {
  font-size: 10px; color: var(--text-sub);
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 56px;
}

/* ===== PHOTO MODAL ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-content {
  background: #131630;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  max-width: 460px; width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 30px rgba(255,82,164,0.15);
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: rgba(0,0,0,0.6); color: #fff;
  border: none; width: 32px; height: 32px;
  border-radius: 50%; font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.modal-photo { width: 100%; display: block; }
.modal-comment-area { padding: 14px; display: flex; gap: 8px; }
.modal-comment-input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 10px; font-size: 14px; font-family: inherit;
  color: #fff; background: rgba(255,255,255,0.06); outline: none;
}
.modal-comment-input:focus { border-color: #22D3EE; }
.modal-comment-save { width: auto; min-width: 70px; padding: 10px 14px; font-size: 12px; min-height: 42px; }
.modal-nav { display: flex; justify-content: center; gap: 16px; padding: 8px; }
.modal-nav-btn {
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-nav-btn:active { background: rgba(255,255,255,0.2); }

/* ===== SCHEDULE INPUT ===== */
.schedule-input { padding: 14px; }
.schedule-type-selector { display: flex; gap: 6px; margin-bottom: 14px; }
.radio-label { flex: 1; cursor: pointer; }
.radio-label input[type="radio"] { display: none; }
.radio-custom {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 11px 6px; border-radius: 10px; font-size: 11px; font-weight: 700;
  border: 1.5px solid var(--card-border); background: var(--card);
  color: var(--text-sub); min-height: 42px;
  -webkit-tap-highlight-color: transparent; transition: all 0.2s;
}
.radio-label input:checked + .radio-custom.confirmed { background: rgba(34,211,238,0.15); border-color: rgba(34,211,238,0.5); color: #22D3EE; }
.radio-label input:checked + .radio-custom.memo-type  { background: rgba(167,139,250,0.15); border-color: rgba(167,139,250,0.5); color: #a78bfa; }
.radio-label input:checked + .radio-custom.task-type  { background: rgba(255,212,58,0.15);  border-color: rgba(255,212,58,0.5);  color: #FFD43A; }
.schedule-form { display: flex; flex-direction: column; gap: 8px; }
.datetime-area {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px; background: var(--input-bg);
  border-radius: 10px; border: 1px solid var(--card-border);
}
.date-time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-label { font-size: 11px; font-weight: 700; color: var(--accent); min-width: 28px; letter-spacing: 1px; }
.dt-input {
  padding: 9px 10px; border: 1.5px solid var(--card-border); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--text); background: var(--input-bg);
  outline: none; flex: 1; min-width: 0; -webkit-appearance: none; color-scheme: dark;
}
.dt-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.allday-badge { background: rgba(167,139,250,0.2); color: #a78bfa; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.btn-schedule { margin-top: 4px; }

.schedule-item {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 12px;
  display: flex; align-items: flex-start; gap: 10px; transition: all 0.2s;
}
.schedule-item.schedule-checked { opacity: 0.35; }
.schedule-text-checked .schedule-title, .schedule-text-checked .schedule-desc, .schedule-text-checked .schedule-datetime { text-decoration: line-through; color: var(--text-sub); }
.schedule-badge { padding: 3px 9px; border-radius: 5px; font-size: 10px; font-weight: 700; white-space: nowrap; margin-top: 2px; }
.schedule-badge.confirmed { background: rgba(34,211,238,0.15); color: #22D3EE; }
.schedule-badge.memo-type  { background: rgba(167,139,250,0.15); color: #a78bfa; }
.schedule-badge.task-type  { background: rgba(255,212,58,0.15);  color: #FFD43A; }
.schedule-content { flex: 1; min-width: 0; }
.schedule-title   { font-size: 14px; font-weight: 600; color: var(--text); }
.schedule-desc    { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.schedule-datetime{ font-size: 11px; color: var(--text-sub); margin-top: 3px; }
.synced-tag       { font-size: 10px; color: var(--accent); margin-top: 3px; opacity: 0.7; }
.schedule-actions { display: flex; gap: 6px; align-items: center; }
.btn-sync {
  background: linear-gradient(135deg, var(--btn-color) 0%, var(--btn-color2) 100%);
  color: #fff; border: none; padding: 5px 12px; border-radius: 7px;
  font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer; min-height: 30px;
  -webkit-tap-highlight-color: transparent;
}
.btn-sync.synced { background: transparent; border: 1px solid var(--card-border); color: var(--text-sub); }
.btn-delete { background: none; border: none; color: var(--text-sub); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px; min-width: 30px; min-height: 30px; display: flex; align-items: center; justify-content: center; }

/* ===== BUTTON (generic) ===== */
.btn-add {
  width: 100%; padding: 13px;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, #FF52A4 0%, #FF3B7C 100%);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,82,164,0.4);
  min-height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  -webkit-tap-highlight-color: transparent;
}
.btn-add:active { transform: scale(0.97); opacity: 0.88; }

/* ===== DT HORIZONTAL ===== */
.dt-horizontal { display: flex; gap: 12px; align-items: stretch; }
.dt-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dt-divider { width: 1px; background: var(--card-border); align-self: stretch; margin: 4px 0; }

/* ===== COLLAPSE ALL TOOLBAR ===== */
.list-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.btn-collapse-all {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid rgba(255,212,58,0.35);
  border-radius: 20px;
  background: rgba(255,212,58,0.06);
  color: #FFD43A;
  font-family: 'Racing Sans One', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  text-shadow: 0 0 6px rgba(255,212,58,0.5);
  box-shadow: 0 0 8px rgba(255,212,58,0.1);
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}
.btn-collapse-all:active {
  background: rgba(255,212,58,0.15);
  box-shadow: 0 0 12px rgba(255,212,58,0.3);
}
.ca-arrow { font-size: 8px; }

/* ===== DETAIL EDIT ===== */
.compact-edit-detail { color: rgba(255,212,58,0.55); }
.compact-edit-detail:active { color: #FFD43A; background: rgba(255,212,58,0.12); }

.detail-edit-area {
  width: 100%;
  padding: 6px 0 4px;
}
.detail-edit-input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid #FFD43A;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: #fff;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  box-shadow: 0 0 8px rgba(255,212,58,0.2);
  min-height: 60px;
  display: block;
}
.detail-edit-input:focus {
  border-color: #FFD43A;
  box-shadow: 0 0 12px rgba(255,212,58,0.35);
}
.detail-edit-btns {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  justify-content: flex-end;
}
.detail-save-btn {
  background: linear-gradient(135deg, #FFD43A 0%, #ffc107 100%);
  color: #0B0E2E;
  border: none;
  border-radius: 6px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 8px rgba(255,212,58,0.4);
}
.detail-save-btn:active { transform: scale(0.96); }
.detail-cancel-btn {
  background: transparent;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.detail-cancel-btn:active { background: rgba(255,255,255,0.06); }

/* ===== EMPTY MESSAGE ===== */
.empty-message {
  text-align: center; color: rgba(255,255,255,0.3);
  padding: 36px 16px; font-size: 13px; font-weight: 500;
  font-family: 'Racing Sans One', sans-serif;
  letter-spacing: 2px;
}

/* ===== SETTINGS MODAL ===== */
.settings-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.settings-content {
  background: #131630;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  max-width: 440px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 30px rgba(34,211,238,0.1);
}
.settings-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.settings-header h2 { font-family: 'Racing Sans One', sans-serif; font-size: 14px; color: #22D3EE; letter-spacing: 3px; text-shadow: 0 0 8px #22D3EE; }
.settings-body { padding: 14px 18px 22px; }
.settings-section-title { font-family: 'Racing Sans One', sans-serif; font-size: 12px; letter-spacing: 2px; color: #FF52A4; text-shadow: 0 0 6px rgba(255,82,164,0.5); margin-bottom: 6px; }
.settings-hint { font-size: 11px; color: rgba(255,255,255,0.35); margin-bottom: 12px; }

.category-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.cat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: rgba(255,255,255,0.04);
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
}
.cat-name { font-size: 13px; color: #fff; }
.cat-move { background: none; border: none; color: rgba(255,255,255,0.3); font-size: 10px; cursor: pointer; padding: 2px 5px; border-radius: 4px; }
.cat-move:active { color: #22D3EE; }
.cat-move:disabled { opacity: 0.15; cursor: default; }
.cat-edit { background: none; border: none; color: rgba(255,255,255,0.3); font-size: 14px; cursor: pointer; padding: 2px 6px; border-radius: 4px; margin-left: auto; }
.cat-edit:active { color: #22D3EE; }
.cat-del  { background: none; border: none; color: rgba(255,255,255,0.3); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.cat-del:active { color: #ff6b6b; }
.cat-edit-input { flex: 1; padding: 6px 10px; font-size: 12px; border: 1.5px solid #22D3EE; border-radius: 6px; color: #fff; background: rgba(255,255,255,0.06); outline: none; font-family: inherit; }
.cat-save { padding: 6px 12px; border: none; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #FF52A4, #FF3B7C); color: #fff; font-family: inherit; }

.category-add-row { display: flex; gap: 6px; }
.category-add-row .input-field { flex: 1; padding: 9px 12px; font-size: 13px; }
.btn-add-cat { padding: 9px 14px; border: none; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #FF52A4, #FF3B7C); color: #fff; -webkit-tap-highlight-color: transparent; box-shadow: 0 0 8px rgba(255,82,164,0.4); }

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
  .app-container { padding: 0 8px 16px; }
  .neon-ttl { font-size: 28px; }
  .neon-sub { font-size: 10px; letter-spacing: 3px; }
  .neon-tag { font-size: 9px; letter-spacing: 4px; }
  .main-tabs { gap: 6px; margin-bottom: 8px; }
  .main-tab { padding: 10px 6px 8px; border-radius: 10px; }
  .tab-emoji { font-size: 16px; }
  .tab-name  { font-size: 11px; letter-spacing: 1px; }
  .tab-jp    { font-size: 9px; }
  .sub-tabs  { margin-bottom: 10px; }
  .sub-tab   { padding: 8px 6px; font-size: 10px; letter-spacing: 2px; min-height: 36px; }
  .sub-icon  { width: 12px; height: 12px; }
  .input-area { padding: 12px 8px 10px; border-radius: 10px; margin-bottom: 10px; }
  .input-select { min-width: 88px; max-width: 110px; font-size: 12px; }
  .input-minor  { padding: 8px 8px; font-size: 12px; }
  .btn-add-inline { width: 36px; height: 36px; min-width: 36px; font-size: 18px; border-radius: 7px; }
  .group-header { padding: 7px 10px; }
  .group-name   { font-size: 11px; letter-spacing: 2px; }
  .group-count  { font-size: 9px; padding: 1px 7px; }
  .compact-row  { padding: 5px 10px; gap: 5px; min-height: 28px; }
  .compact-cb   { width: 14px; height: 14px; min-width: 14px; }
  .compact-cb:checked::after { left: 2px; top: 0; width: 4px; height: 7px; }
  .compact-left  { min-width: 42px; max-width: 80px; font-size: 10px; }
  .compact-detail{ font-size: 10px; }
  .compact-btn   { font-size: 11px; min-width: 22px; min-height: 22px; padding: 2px 4px; }
  .alien-wrap svg { width: 240px; }
  .btn-settings svg { width: 14px; height: 14px; }
}
