/* HAEBOM v5.0 — One-screen home + straightforward schedule editing.
   Keep this scoped: all other tabs, experiences, and Supabase interfaces unchanged. */
:root{--v50-ink:#302a30;--v50-muted:#877a85;--v50-accent:#74596e;--v50-line:#e9dfe5;--v50-paper:#fffdfc}
/* Never make a user choose a date for an undated wish. */
#plan-wish-note{align-items:center;gap:13px;background:#f8f2f6;border:1px solid #eadde6;border-radius:15px;padding:17px 18px;margin:4px 0 18px;color:var(--v50-ink)}
#plan-wish-note:not(.hidden){display:flex}
#plan-wish-note>span{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:#eee0e9;color:#876479;font-size:25px;flex:none}
#plan-wish-note strong{display:block;font-size:14px;font-weight:760}
#plan-wish-note p{margin:4px 0 0;color:var(--v50-muted);font-size:12px}
/* Explicit AM/PM, hour, minute selectors instead of clock-dial UI */
.journal-editor .v50-time-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.85fr) auto minmax(0,.85fr) auto;align-items:center;gap:7px;width:100%;min-width:0}
.journal-editor .v50-time-controls select{appearance:none;-webkit-appearance:none;border:1px solid #e5dce2;background:#fffdfc;padding:0 23px 0 10px;color:#3c3239;border-radius:11px;min-width:0;min-height:45px;font-weight:680;font-size:15px;text-align:center;background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"%3E%3Cpath d="m4 6 4 4 4-4" stroke="%237a6473" stroke-width="1.5" stroke-linecap="round" fill="none"/%3E%3C/svg%3E');background-position:right 5px center;background-size:14px;background-repeat:no-repeat}
.journal-editor .v50-time-controls select:focus-visible{outline:2px solid #9a7990;outline-offset:2px}
.journal-editor .v50-time-colon{font-size:19px;font-weight:800;color:#786d77}
.journal-editor .v50-time-clear{border:0;background:transparent;color:#867584;padding:9px 2px;font-size:12px;white-space:nowrap}
.journal-editor #plan-time-row{align-items:center}
.journal-editor #plan-time-row .v50-time-controls{max-width:440px}
@media(max-width:415px){.journal-editor .v50-time-controls{gap:4px}.journal-editor .v50-time-controls select{min-height:43px;padding:0 17px 0 5px;font-size:13px;border-radius:9px}.journal-editor .v50-time-controls select{background-size:12px;background-position:right 3px center}.journal-editor .v50-time-clear{font-size:11px}}
/* Home's role is orientation. Full catalog, collection and detailed plans live one tap away. */
#tab-home{position:relative}
#tab-home .v46-home-discover,#tab-home .home-archive-more,#tab-home .quiet-home-revisit{display:none!important}
#tab-home .v48-hero-art{opacity:.48;transform:scale(.65);transform-origin:right center}
#tab-home .v47-discover-spotlight{margin-bottom:0!important}
#tab-home .v47-spotlight-top{min-height:0}
#tab-home .v42-home-list>*:not(:first-child){display:none!important}
#tab-home .quiet-recent-gallery>*:not(:first-child){display:none!important}
#tab-home .cloud-status{font-size:10px!important}
#tab-home .v42-home-section{margin:0!important}
#tab-home .v42-section-heading{margin:0 0 7px!important}
#tab-home .v42-section-heading h2{font-size:15px!important;font-weight:790}
#tab-home .v42-see-all{min-height:29px!important;padding:4px 10px!important}
#tab-home .v42-section-heading h2::before{display:none!important}
#tab-home .home-stats-quiet{margin:0!important;padding:0!important}
#tab-home .home-compact-summary{min-height:0!important;border:0!important;padding:0!important}
#tab-home .quiet-home-total{display:flex;align-items:baseline;gap:4px;font-size:12px;color:#7b7079}
#tab-home .quiet-home-total strong{font-size:19px!important;color:#785a70;font-weight:830}
#tab-home .quiet-home-years{display:none}
#tab-home .v42-home-preview-row{box-shadow:none!important;border-radius:15px!important}
#tab-home .v42-home-empty{margin:0!important}
/* Responsive viewport dashboard on devices with enough physical room. */
@media(min-width:901px){
 #archive-view:has(#tab-home.active) .journal-layout{max-width:960px;min-height:0;padding:20px 0 12px!important}
 #tab-home.active{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto minmax(160px,1fr) auto minmax(105px,.8fr) minmax(155px,1fr);grid-template-areas:'title title' 'hero hero' 'stats stats' 'soon wish' 'recent recent';column-gap:17px;row-gap:12px;max-height:calc(100dvh - 120px);min-height:530px;overflow:hidden}
 #tab-home .home-heading-holder{grid-area:title;margin:0!important}
 #tab-home .v47-discover-spotlight{grid-area:hero;min-height:0}
 #tab-home .home-stats-quiet{grid-area:stats}
 #tab-home .cloud-status{position:absolute;right:0;top:0;max-width:250px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #tab-home #home-upcoming-section{grid-area:soon}
 #tab-home #home-wish-section{grid-area:wish}
 #tab-home .v42-home-completed{grid-area:recent;min-width:0;min-height:0}
 #tab-home .v42-home-completed .quiet-recent-gallery{height:calc(100% - 33px);display:grid;grid-template-columns:1fr!important}
 #tab-home .v49-ticket{max-width:none!important;min-height:0!important;height:100%!important;aspect-ratio:auto!important}
 #tab-home .v47-spotlight-top{height:100%}
 #tab-home .v47-spotlight-copy h2{font-size:clamp(25px,3vw,32px)!important}
 #tab-home .v47-discover-spotlight{padding:18px 28px!important}
}
@media(max-width:900px){
 #archive-view:has(#tab-home.active) .journal-layout{padding:9px 0 0!important;min-height:0!important}
 #tab-home.active{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto minmax(130px,1.18fr) auto minmax(105px,.9fr) minmax(138px,1fr);grid-template-areas:'title title' 'hero hero' 'stats stats' 'soon wish' 'recent recent';column-gap:10px;row-gap:10px;height:calc(100dvh - 164px);min-height:0;overflow:hidden;padding:0 0 2px}
 #tab-home .home-heading-holder{grid-area:title;margin:0!important}
 #tab-home .home-page-heading{margin:0!important}
 #tab-home .home-page-heading h1{font-size:23px!important;line-height:1.2;letter-spacing:-.055em}
 #tab-home .home-page-heading .page-subtitle{display:none}
 #tab-home .v50-home-eyebrow{font-size:11px;margin-left:5px;white-space:nowrap;font-weight:560;color:#9d8e98;letter-spacing:-.01em}
 #tab-home .v47-discover-spotlight{grid-area:hero;margin:0!important;min-height:0!important;padding:15px 17px!important;border-radius:21px;box-shadow:none}
 #tab-home .v47-spotlight-top{min-height:0!important;height:100%;display:block}
 #tab-home .v48-hero-art{display:none!important}
 #tab-home .v47-spotlight-copy{height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:none}
 #tab-home .v47-kicker{margin:0 0 5px!important;font-size:9px;letter-spacing:.09em}
 #tab-home .v47-spotlight-copy h2{font-size:clamp(20px,5.5vw,25px)!important;line-height:1.17!important;margin:0 0 5px!important}
 #tab-home .v47-spotlight-description{font-size:11px!important;line-height:1.35!important;margin:0 0 11px!important;white-space:normal}
 #tab-home .v48-discovery-actions{display:flex!important;gap:8px;flex-wrap:nowrap;width:100%}
 #tab-home .v48-discovery-actions button{flex:1;min-width:0;min-height:39px!important;height:39px;font-size:12px!important;white-space:nowrap;justify-content:center;border-radius:12px}
 #tab-home .v48-discovery-actions .v48-button-symbol,#tab-home .v48-discovery-actions .v48-button-arrow{display:none!important}
 #tab-home .home-stats-quiet{grid-area:stats;display:flex;justify-content:flex-end;align-items:center;min-height:0}
 #tab-home .home-stats-quiet .quiet-home-total{font-size:11px!important;line-height:1}
 #tab-home .home-stats-quiet .quiet-home-total strong{font-size:17px!important}
 #tab-home .cloud-status{display:none!important}
 #tab-home #home-upcoming-section{grid-area:soon;min-width:0;min-height:0}
 #tab-home #home-wish-section{grid-area:wish;min-width:0;min-height:0}
 #tab-home .v42-section-heading{margin:0 0 7px!important;align-items:center}
 #tab-home .v42-section-heading h2{font-size:13px!important;letter-spacing:-.055em;white-space:nowrap}
 #tab-home .v42-see-all{min-height:24px!important;font-size:10px!important;padding:3px 5px!important;border:0!important;background:transparent!important}
 #tab-home .v42-home-list{height:calc(100% - 30px);min-height:0!important}
 #tab-home .v42-home-preview-row{display:flex!important;flex-direction:column;justify-content:center;align-items:flex-start;min-height:0!important;height:100%;padding:11px!important;gap:2px!important;border-radius:14px!important;background:#fffdfb!important}
 #tab-home .v47-preview-glyph{display:none!important}
 #tab-home .v42-home-preview-info{min-width:0;width:100%}
 #tab-home .v42-home-preview-info strong{font-size:12px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.38;word-break:break-word}
 #tab-home .v42-home-preview-info small{font-size:10px!important;line-height:1.2}
 #tab-home .v42-day-tag{font-size:10px!important;padding:3px 6px!important;min-width:0;position:absolute;right:9px;bottom:9px}
 #tab-home .v42-home-preview-row{position:relative;padding-bottom:27px!important}
 #tab-home .v47-preview-arrow{display:none!important}
 #tab-home .v42-home-empty{height:100%;min-height:0!important;padding:9px!important;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:5px}
 #tab-home .v42-home-empty span{font-size:11px!important;line-height:1.35}
 #tab-home .v42-home-empty button{min-height:30px!important;font-size:10px!important;padding:4px 8px!important}
 #tab-home .v42-home-completed{grid-area:recent;min-height:0;min-width:0;overflow:hidden}
 #tab-home .v42-home-completed .quiet-recent-gallery{display:grid!important;grid-template-columns:1fr!important;height:calc(100% - 31px)!important;min-height:0;overflow:hidden;gap:0!important}
 #tab-home .v42-home-completed .quiet-recent-gallery>.v49-ticket{height:100%!important;min-height:0!important;max-width:none!important;aspect-ratio:auto!important;border-radius:15px!important;grid-template-columns:38% 62%;}
 #tab-home .v49-ticket-visual{min-height:0!important}
 #tab-home .v49-ticket-content{padding:10px 15px!important;min-height:0!important}
 #tab-home .v49-ticket-title{font-size:clamp(14px,4.5vw,18px)!important;line-height:1.24!important}
 #tab-home .v49-ticket-copy{min-height:0!important}
 #tab-home .v49-ticket-note{display:none!important}
 #tab-home .v42-home-completed .v37-home-empty{height:100%!important;min-height:0!important;padding:14px!important}
 #tab-home .v42-home-completed .v37-home-empty .v37-empty-ornament{display:none}
 #tab-home .v42-home-completed .v37-home-empty strong{font-size:13px}
 #tab-home .v42-home-completed .v37-home-empty span{font-size:11px}
}
@media(max-width:900px) and (max-height:740px){
 #archive-view:has(#tab-home.active) .journal-layout{padding-top:5px!important}
 #tab-home.active{height:calc(100dvh - 151px);row-gap:6px;grid-template-rows:auto minmax(118px,1.13fr) auto minmax(89px,.82fr) minmax(108px,1fr)}
 #tab-home .home-page-heading h1{font-size:20px!important}
 #tab-home .v47-discover-spotlight{padding:10px 14px!important;border-radius:16px}
 #tab-home .v47-spotlight-copy h2{font-size:20px!important}
 #tab-home .v47-kicker{display:none}
 #tab-home .v47-spotlight-description{margin:0 0 8px!important;font-size:10px!important}
 #tab-home .v48-discovery-actions button{min-height:34px!important;height:34px}
 #tab-home .v42-section-heading{margin-bottom:3px!important}
 #tab-home .v42-home-list{height:calc(100% - 24px)}
 #tab-home .v42-home-preview-row{padding:8px!important;padding-bottom:19px!important}
 #tab-home .v42-day-tag{bottom:4px}
 #tab-home .v42-home-completed .quiet-recent-gallery{height:calc(100% - 27px)!important}
}
@media(max-width:900px) and (max-height:570px){
 /* Extreme landscape / zoom: preserve readable controls instead of clipping content. */
 #tab-home.active{height:auto;min-height:calc(100dvh - 160px);overflow:visible;grid-template-rows:auto auto auto auto auto}
 #tab-home .v47-discover-spotlight{min-height:125px!important}
 #tab-home .v42-home-list{height:95px}
 #tab-home .v42-home-completed .quiet-recent-gallery{height:140px!important}
 #archive-view:has(#tab-home.active) .journal-layout{padding-bottom:100px!important}
}

/* Desktop refinements after visual review: avoid clipping the primary CTA. */
#tab-home .v50-home-eyebrow{font-size:12px;font-weight:570;color:#9b8995;letter-spacing:-.015em;margin-left:10px;vertical-align:middle}
@media(min-width:901px){
 #tab-home .v47-kicker{margin:0 0 4px!important}
 #tab-home .v47-spotlight-copy h2{line-height:1.14!important;margin:0 0 6px!important}
 #tab-home .v47-spotlight-description{line-height:1.35!important;margin-bottom:10px!important}
 #tab-home .v47-spotlight-action{min-height:39px!important;padding:8px 15px!important}
 #tab-home .v48-browse-action{min-height:39px!important;padding:8px 15px!important}
}

/* Critical synchronization failures must remain visible, even on a compact home. */
#tab-home .cloud-status.warn{display:block!important;position:fixed!important;top:78px;left:16px;right:16px;width:min(500px,calc(100% - 32px));max-width:none;margin:0 auto!important;padding:12px 15px!important;background:#fff8f8;color:#91475d;border:1px solid #e7c3cf;border-radius:12px;box-shadow:0 8px 22px rgba(45,24,37,.12);z-index:49;opacity:1!important;text-align:left;white-space:normal}
