/* MealLog Ver.0.22 - clean rebuild based on approved desktop/mobile mockups */

:root {
  --night:#09051f;
  --panel:rgba(17,10,48,.86);
  --panel2:rgba(24,13,62,.88);
  --line:rgba(255,255,255,.14);
  --cream:#fff8ee;
  --muted:#d7cce5;
  --pink:#ff4f86;
  --pink2:#ff7a77;
  --orange:#ff9d2f;
  --orange2:#e46f18;
  --cyan:#1ec7d3;
  --blue:#0f76b8;
  --purple:#37265e;
  --purple2:#1d153e;
}

html,body{
  min-height:100%;
  background:#08051b !important;
}
body{
  margin:0;
  color:var(--cream) !important;
  background:
    linear-gradient(180deg,rgba(6,3,20,.12),rgba(7,3,20,.48)),
    url('./assets/festival-bg-v22.png') center top / cover fixed no-repeat !important;
}
body::before{
  content:"";
  position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg,rgba(3,2,17,.02) 0 24%,rgba(7,3,24,.45) 66%,rgba(6,2,20,.65) 100%);
}

.app-view{
  width:100% !important;
  min-height:100vh;
  padding:0 !important;
  overflow:visible !important;
  background:transparent !important;
}
.festival-shell{
  width:min(1500px,calc(100% - 32px));
  margin:0 auto;
  padding:20px 0 58px;
}

/* Header */
.app-header{
  position:sticky;
  top:10px;
  z-index:60;
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 18px;
  margin-bottom:18px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:30px;
  background:linear-gradient(180deg,rgba(15,7,45,.76),rgba(15,7,45,.62));
  backdrop-filter:blur(18px) saturate(135%);
  box-shadow:0 18px 44px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.06);
}
.app-brand{display:flex;align-items:center;gap:14px;min-width:0}
.app-brand-icon{width:62px;height:62px;border-radius:18px;object-fit:cover;box-shadow:0 10px 22px rgba(0,0,0,.28),0 0 0 2px rgba(255,255,255,.08)}
.app-brand-copy{display:grid;gap:5px;min-width:0}
.app-brand-copy strong{
  font-family:"Mochiy Pop One","Noto Sans JP",sans-serif;
  font-size:clamp(1.9rem,3vw,3rem);
  line-height:1;
  letter-spacing:-.045em;
  color:#fff5d7;
  text-shadow:0 4px 18px rgba(0,0,0,.28);
}
.app-brand-copy small{color:#fff3a9;font-weight:800;letter-spacing:.12em;font-size:.72rem}
.app-header-actions{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.round-action,.profile-action,.record-button,.filter-button,.view-all-button,.clear-place{
  border:0;cursor:pointer;color:#fff;font-weight:800;transition:transform .15s ease,filter .15s ease,box-shadow .15s ease;
}
.round-action:hover,.profile-action:hover,.record-button:hover,.filter-button:hover,.view-all-button:hover,.clear-place:hover{filter:brightness(1.06)}
.round-action:active,.profile-action:active,.record-button:active,.filter-button:active,.view-all-button:active,.clear-place:active{transform:scale(.97)}
.round-action{width:50px;height:50px;border-radius:50%;font-size:1.5rem;background:linear-gradient(145deg,#49316d,#241840);box-shadow:0 10px 22px rgba(0,0,0,.24),inset 0 0 0 1px rgba(255,255,255,.12)}
.record-button{
  min-height:54px;padding:0 24px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:linear-gradient(145deg,#ff568d,#ff755f);
  box-shadow:0 14px 30px rgba(255,65,126,.28),inset 0 1px 0 rgba(255,255,255,.28);
}
.record-button>span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#ff4f86;font-size:1.5rem;line-height:1}
.record-button.compact{min-height:46px;padding:0 18px}
.record-button.compact>span{display:none}
.record-button.large{min-width:230px;min-height:58px;font-size:1.05rem}
.profile-action{width:52px;height:52px;padding:3px;border-radius:50%;background:linear-gradient(145deg,#4a326e,#251843);box-shadow:0 10px 22px rgba(0,0,0,.24),inset 0 0 0 1px rgba(255,255,255,.12)}
.profile-action img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.profile-menu{
  position:absolute !important;right:14px !important;top:82px !important;z-index:70 !important;
  min-width:250px !important;padding:14px !important;border-radius:18px !important;
  border:1px solid var(--line) !important;background:rgba(20,10,52,.96) !important;color:#fff !important;
  box-shadow:0 18px 42px rgba(0,0,0,.34) !important;backdrop-filter:blur(16px) !important;
}
.profile-menu p{color:var(--muted) !important}
.profile-menu button{width:100% !important;margin-top:8px;border:1px solid rgba(255,255,255,.1) !important;border-radius:12px !important;background:rgba(255,255,255,.07) !important;color:#fff !important;padding:10px !important;font-weight:800 !important}

/* Desktop frame */
.app-layout{display:grid;grid-template-columns:200px minmax(0,1fr);gap:18px;align-items:start}
.desktop-sidebar{
  position:sticky;top:120px;display:flex;flex-direction:column;gap:8px;padding:16px 12px;border:1px solid var(--line);border-radius:28px;
  background:linear-gradient(180deg,rgba(25,13,61,.82),rgba(13,8,42,.88));backdrop-filter:blur(16px);
  box-shadow:0 18px 42px rgba(0,0,0,.24);
}
.side-nav{min-height:56px;display:grid;grid-template-columns:32px 1fr;align-items:center;gap:10px;padding:0 14px;border:1px solid transparent;border-radius:16px;background:transparent;color:#e7dcef;text-align:left;font:inherit;cursor:pointer}
.side-nav span{font-size:1.3rem;text-align:center}.side-nav b{font-size:.93rem}
.side-nav:hover{background:rgba(255,255,255,.06)}
.side-nav.active{background:linear-gradient(145deg,rgba(255,84,140,.92),rgba(202,35,94,.88));border-color:rgba(255,194,220,.38);color:#fff;box-shadow:0 10px 22px rgba(255,54,118,.16)}
.main-stage{min-width:0}

/* Dashboard */
.dashboard-panel{
  position:relative;overflow:hidden;padding:28px;border:1px solid var(--line);border-radius:34px;
  background:linear-gradient(180deg,rgba(15,8,48,.78),rgba(10,5,35,.86));backdrop-filter:blur(16px);
  box-shadow:0 22px 50px rgba(0,0,0,.27),inset 0 1px 0 rgba(255,255,255,.05);
}
.dashboard-panel::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 90% 8%,rgba(255,108,167,.14),transparent 20rem),radial-gradient(circle at 16% 5%,rgba(255,173,66,.08),transparent 16rem)}
.dashboard-mascot{position:absolute;right:24px;top:-2px;width:215px;height:142px;z-index:1;overflow:hidden;border-radius:0 0 0 38px;opacity:.98;pointer-events:none}
.dashboard-mascot img{width:100%;height:100%;object-fit:cover;object-position:50% 45%;-webkit-mask-image:linear-gradient(to left,#000 78%,transparent 100%),linear-gradient(to top,#000 72%,transparent 100%);-webkit-mask-composite:source-in;mask-image:linear-gradient(to left,#000 78%,transparent 100%),linear-gradient(to top,#000 72%,transparent 100%);mask-composite:intersect}
.search-row{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) 64px;gap:12px;width:calc(100% - 225px);margin-bottom:22px}
.search-field{min-height:66px;display:flex;align-items:center;gap:14px;padding:0 22px;border:2px solid rgba(255,117,186,.32);border-radius:28px;background:linear-gradient(180deg,rgba(53,32,91,.94),rgba(37,24,70,.94));box-shadow:0 12px 28px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.05)}
.search-field>span{font-size:2rem;color:#fff}.search-field input{width:100%;border:0 !important;background:transparent !important;color:#fff !important;box-shadow:none !important;padding:0 !important;font-size:1.05rem !important}.search-field input::placeholder{color:#d8cbe6 !important}
.filter-button{width:64px;height:66px;border-radius:22px;background:linear-gradient(145deg,#463069,#281b49);box-shadow:0 10px 22px rgba(0,0,0,.22),inset 0 0 0 1px rgba(255,255,255,.1);font-size:1.55rem}
.place-section{position:relative;z-index:2;margin-top:4px}
.place-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.place-section-head h2{margin:0;color:#fff7fb;font-size:1.18rem}.place-section-head h2 span{color:#ff709d;font-size:.9rem}.clear-place{min-height:38px;padding:0 14px;border-radius:999px;background:linear-gradient(145deg,#4a326c,#2a1d4a);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);font-size:.78rem}
.place-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.place-button{
  min-height:74px;display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 12px;border:2px solid rgba(255,255,255,.1);border-radius:20px;
  background:linear-gradient(145deg,#302050,#21163e);color:#fff;font:inherit;font-weight:800;cursor:pointer;box-shadow:0 10px 20px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.05);transition:.15s ease;
}
.place-button:hover{transform:translateY(-1px);filter:brightness(1.06)}.place-button.active{background:linear-gradient(145deg,#fff4f7,#ffdce7);color:#e9386f;border-color:#ff6e9c;box-shadow:0 10px 22px rgba(255,73,131,.18)}
.place-icon{font-size:1.5rem;line-height:1}.place-button strong{font-size:1rem;white-space:nowrap}

.summary-grid{position:relative;z-index:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:20px}
.summary-tile{
  min-height:148px;display:grid;grid-template-columns:72px minmax(0,1fr) 20px;align-items:center;gap:12px;padding:18px;border-radius:26px;color:#fff;overflow:hidden;position:relative;box-shadow:0 16px 30px rgba(0,0,0,.19);border:1px solid rgba(255,255,255,.14)
}
.summary-tile::after{content:"";position:absolute;width:140px;height:140px;right:-40px;top:-58px;border-radius:50%;background:rgba(255,255,255,.13)}
.count-tile{background:linear-gradient(145deg,#ff4382,#cf185d)}.spend-tile{background:linear-gradient(145deg,#ffa02b,#d76e19)}.store-tile{background:linear-gradient(145deg,#1bcbd2,#0b78b2)}
.summary-icon{width:64px;height:64px;border-radius:20px;display:grid;place-items:center;font-size:2rem;background:rgba(255,255,255,.18);position:relative;z-index:1}.summary-copy{min-width:0;display:grid;gap:4px;position:relative;z-index:1}.summary-copy>span{font-weight:800;font-size:.88rem}.summary-copy>strong{font-size:clamp(1.75rem,2.5vw,2.7rem);line-height:1.08;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-copy>small{font-size:.72rem;color:rgba(255,255,255,.9);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-arrow{position:relative;z-index:1;font-size:2rem;color:rgba(255,255,255,.88)}

/* Recent meals */
.recent-panel{margin-top:18px;padding:22px;border:1px solid var(--line);border-radius:32px;background:linear-gradient(180deg,rgba(20,11,53,.82),rgba(12,7,39,.88));backdrop-filter:blur(16px);box-shadow:0 20px 46px rgba(0,0,0,.24)}
.recent-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:16px}.recent-heading p{margin:0 0 5px;color:#ff94b7;font-size:.68rem;font-weight:900;letter-spacing:.18em}.recent-heading h2{margin:0;color:#fff;font-size:1.9rem}.view-all-button{min-height:42px;padding:0 16px;border-radius:999px;background:linear-gradient(145deg,#4a316d,#2a1c4a);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
.timeline-grid{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:14px !important;align-items:stretch !important}
.meal-card{position:relative !important;display:grid !important;grid-template-columns:42% minmax(0,1fr) !important;min-height:166px !important;border:1px solid rgba(255,125,202,.26) !important;border-radius:20px !important;overflow:hidden !important;background:linear-gradient(145deg,rgba(29,17,61,.96),rgba(15,10,41,.98)) !important;box-shadow:0 12px 26px rgba(0,0,0,.18) !important;transform:none !important}
.meal-cover{min-height:166px !important;aspect-ratio:auto !important;background:#1d1536 !important}.meal-cover img{width:100%;height:100%;object-fit:cover;display:block}.photo-count{right:7px !important;bottom:7px !important;background:rgba(10,7,28,.72) !important}
.meal-body{position:relative;padding:12px 26px 10px 12px !important;display:flex !important;flex-direction:column !important;gap:5px !important;min-width:0}.meal-kebab{position:absolute;right:5px;top:7px;color:#fff;background:transparent;border:0;font-size:1.3rem;cursor:pointer}.meal-body h3{margin:0 !important;font-size:1rem !important;line-height:1.25 !important;color:#fff !important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.meal-location-line{min-width:0}.store-inline,.place-inline{padding:0 !important;min-height:auto !important;border:0 !important;background:transparent !important;color:#e9dff5 !important;font-size:.75rem !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.meal-stats-row{display:grid !important;grid-template-columns:1fr auto !important;grid-template-areas:'date rating' 'price rating' !important;gap:2px 8px !important;align-items:end}.meal-price-main{grid-area:price;color:#fff;font-size:1.05rem !important}.meal-rating-main{grid-area:rating;color:#ffd24a;font-size:.78rem !important}.meal-card-date{grid-area:date;color:#d8cde6 !important;font-size:.68rem !important}.meal-tags{display:flex !important;flex-wrap:wrap !important;gap:4px !important;margin-top:auto}.meal-tag{min-height:22px !important;padding:0 7px !important;border:0 !important;border-radius:999px !important;color:#fff !important;font-size:.58rem !important;font-weight:800 !important;display:inline-flex !important;align-items:center !important}.meal-tag.place{background:linear-gradient(145deg,#ff4f88,#d52362) !important}.meal-tag.storetag{background:linear-gradient(145deg,#f0a21c,#c56c0d) !important}.meal-tag.shared{background:linear-gradient(145deg,#14bce0,#087eb9) !important}.meal-note{display:none !important}.meal-actions{display:none !important}
.state-card,.empty-state{min-height:240px !important;border:1px dashed rgba(255,255,255,.17) !important;border-radius:24px !important;background:rgba(38,24,77,.56) !important;color:var(--muted) !important}.empty-state h3{color:#fff !important}.empty-icon{background:linear-gradient(145deg,#ff5c8b,#ff7b67) !important;color:#fff !important}

/* Bottom CTA */
.bottom-cta{margin-top:18px;min-height:180px;display:grid;grid-template-columns:150px minmax(0,1fr) 230px;align-items:center;gap:18px;padding:16px 22px;border:1px solid var(--line);border-radius:28px;background:linear-gradient(90deg,rgba(21,10,56,.72),rgba(17,8,48,.66)),url('./assets/festival-bg-v22.png') center 55% / cover no-repeat;overflow:hidden;box-shadow:0 18px 38px rgba(0,0,0,.21)}
.cta-mascot{align-self:end;height:148px;overflow:hidden}.cta-mascot img{width:170px;height:150px;object-fit:cover;object-position:48% 48%;-webkit-mask-image:radial-gradient(ellipse at center,#000 62%,transparent 96%);mask-image:radial-gradient(ellipse at center,#000 62%,transparent 96%)}.cta-copy small{color:#ff9db8;font-size:.65rem;font-weight:900;letter-spacing:.16em}.cta-copy h3{margin:7px 0 0;color:#fff;font-size:clamp(1.45rem,2vw,2rem);line-height:1.35}

/* Dark modal theme */
.modal::backdrop{background:rgba(5,2,18,.65) !important;backdrop-filter:blur(8px) !important}.modal-card,.detail-card,.store-history-card,.share-card{background:linear-gradient(180deg,rgba(30,17,69,.98),rgba(15,10,42,.99)) !important;border:1px solid rgba(255,255,255,.14) !important;color:#fff !important}.modal-header h2,.detail-info h2,.share-card h2{color:#fff !important}.form-stack label>span,.form-grid label>span,.field-label,.form-grid em,.share-lead,.upload-status{color:#d9cee6 !important}input,textarea,select{color:#fff !important;background:rgba(49,31,89,.78) !important;border:1px solid rgba(255,255,255,.14) !important}input::placeholder,textarea::placeholder{color:rgba(233,219,244,.48) !important}.choice-pills{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important}.choice-pills label span{min-height:52px !important;border:2px solid rgba(255,255,255,.12) !important;border-radius:16px !important;background:linear-gradient(145deg,#332252,#21163d) !important;color:#fff !important;display:grid !important;place-items:center !important}.choice-pills input:checked+span{background:linear-gradient(145deg,#fff4f7,#ffdce7) !important;color:#e9386f !important;border-color:#ff6e9c !important}

/* Responsive */
@media(max-width:1180px){
  .festival-shell{width:min(100% - 22px,1100px)}
  .app-layout{grid-template-columns:1fr}
  .desktop-sidebar{display:none}
  .dashboard-mascot{width:180px;height:125px}
  .search-row{width:calc(100% - 185px)}
  .timeline-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}

@media(max-width:760px){
  body{background-position:center top !important}
  .festival-shell{width:calc(100% - 12px);padding-top:8px}
  .app-header{top:5px;min-height:74px;padding:9px 10px;border-radius:23px;margin-bottom:10px}
  .app-brand{gap:9px}.app-brand-icon{width:50px;height:50px;border-radius:14px}.app-brand-copy strong{font-size:1.72rem}.app-brand-copy small{font-size:.55rem;letter-spacing:.1em}
  .app-header-actions{gap:7px}.round-action{width:42px;height:42px;font-size:1.1rem}.record-button{min-height:46px;padding:0 12px;font-size:.78rem;gap:5px}.record-button>span{width:28px;height:28px;font-size:1.15rem}.profile-action{width:42px;height:42px}

  .dashboard-panel{padding:14px 10px 12px;border-radius:25px}
  .dashboard-mascot{width:155px;height:120px;right:2px;top:-2px}
  .search-row{width:calc(100% - 90px);grid-template-columns:minmax(0,1fr) 48px;gap:7px;margin-top:80px;margin-bottom:14px}.search-field{min-height:54px;padding:0 14px;border-radius:21px;gap:9px}.search-field>span{font-size:1.45rem}.search-field input{font-size:.88rem !important}.filter-button{width:48px;height:54px;border-radius:17px;font-size:1.05rem}
  .place-section-head{margin-bottom:8px}.place-section-head h2{font-size:1rem}.clear-place{min-height:34px;padding:0 10px;font-size:.65rem}
  .place-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.place-button{min-height:64px;padding:8px 4px;gap:4px;border-radius:15px;flex-direction:column}.place-icon{font-size:1.2rem}.place-button strong{font-size:.72rem;white-space:nowrap}

  .summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:12px}.summary-tile{min-height:122px;grid-template-columns:1fr;grid-template-rows:34px auto auto;align-content:start;gap:3px;padding:10px 8px;border-radius:18px}.summary-icon{width:34px;height:34px;border-radius:11px;font-size:1.25rem}.summary-copy{gap:2px}.summary-copy>span{font-size:.61rem;white-space:nowrap}.summary-copy>strong{font-size:1.3rem;white-space:nowrap}.summary-copy>small{font-size:.52rem;white-space:nowrap}.summary-arrow{position:absolute;right:7px;bottom:7px;font-size:1.2rem}

  .recent-panel{margin-top:10px;padding:12px 8px 14px;border-radius:24px}.recent-heading{margin-bottom:10px;padding:0 3px}.recent-heading p{font-size:.55rem}.recent-heading h2{font-size:1.35rem}.view-all-button{min-height:34px;padding:0 10px;font-size:.65rem}
  .timeline-grid{grid-template-columns:1fr !important;gap:8px !important}.meal-card{grid-template-columns:32% minmax(0,1fr) !important;min-height:128px !important;border-radius:16px !important}.meal-cover{min-height:128px !important}.meal-body{padding:9px 22px 8px 9px !important;gap:3px !important}.meal-kebab{right:3px;top:4px;font-size:1.05rem}.meal-body h3{font-size:.9rem !important}.store-inline,.place-inline{font-size:.65rem !important}.meal-price-main{font-size:.9rem !important}.meal-rating-main{font-size:.65rem !important}.meal-card-date{font-size:.6rem !important}.meal-tag{min-height:19px !important;padding:0 5px !important;font-size:.52rem !important}.photo-count{font-size:.56rem !important;padding:3px 5px !important}

  .bottom-cta{grid-template-columns:76px minmax(0,1fr);min-height:142px;padding:10px 12px;gap:10px;border-radius:22px}.cta-mascot{height:94px}.cta-mascot img{width:100px;height:96px}.cta-copy small{font-size:.48rem}.cta-copy h3{font-size:1rem}.bottom-cta .record-button{grid-column:1/-1;width:100%;min-width:0}
}

@media(max-width:420px){
  .app-brand-copy small{display:none}
  .app-brand-copy strong{font-size:1.55rem}
  .round-action{display:none}
  .record-button{padding:0 10px}.record-button strong{font-size:.72rem}
  .dashboard-mascot{width:130px;height:102px}
  .search-row{width:calc(100% - 60px);margin-top:68px}
  .place-button strong{font-size:.64rem}
  .summary-tile{min-height:112px;padding:8px 6px}.summary-copy>span{font-size:.56rem}.summary-copy>strong{font-size:1.12rem}.summary-copy>small{display:none}
  .meal-card{grid-template-columns:34% minmax(0,1fr) !important}.meal-cover{min-height:120px !important}
}
