/* Mobile-first home. User-supplied artwork is preserved; overlays are CSS only. */
:root{--home-hero-desktop:url("hero-collection.png?v=mobile-home-20260923-hero3");--home-hero-mobile:url("hero-mobile.png?v=mobile-home-20260923-hero3");--home-gap:10px;--home-radius:9px}
.home-icon{display:block;width:24px;height:24px;flex:0 0 auto}
.home-icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0;border:1px solid var(--line);border-radius:12px;background:transparent}
.home-redesign .site-header{min-height:76px;display:flex;gap:16px;padding:12px max(20px,calc((100vw - 1120px)/2));overflow:visible}
.home-redesign .brand{gap:10px;max-width:none;min-width:0}
.home-redesign .brand img{width:44px;height:44px;border-radius:11px;flex-shrink:0}
.home-redesign .brand strong{font-size:24px;line-height:1.15;font-weight:500;white-space:nowrap}
.home-redesign .brand small{display:block;font:9px/1.6 Arial,sans-serif;letter-spacing:2.3px;margin-top:4px}
.home-redesign .brand-version{display:none!important}
.home-redesign .header-actions{display:flex;gap:10px;margin-left:auto;flex:0 0 auto;align-items:center}
.home-redesign .header-actions .home-icon-button{padding:0;width:44px;height:44px;min-width:44px;font-size:22px}
.home-redesign #homeSearchShortcut{border:0}
.home-redesign #homeAddButton{border-radius:50%;background:var(--moss);border-color:var(--moss);color:#fff}
.home-redesign #homeAddButton .home-icon{width:27px;height:27px}
.home-redesign .language-control select{width:63px;min-width:0;max-width:none;height:44px;padding:0 6px;border:1px solid var(--line);border-radius:10px;font-size:14px;background:transparent}
.home-redesign .logout-action{font-size:12px}
.home-redesign .app-shell{max-width:1200px;padding:0 40px 110px;overflow-x:clip}
#collectionPage .home-hero{position:relative;isolation:isolate;overflow:hidden;min-height:0;height:260px;margin:0 -40px 28px;padding:30px 52px;display:flex;align-items:center;background:#f5f2e9}
#collectionPage .home-hero::before{content:"";position:absolute;z-index:-1;inset:0;background:var(--home-hero-desktop) right top/auto 100% no-repeat;-webkit-mask-image:linear-gradient(to left,#000 0%,#000 58%,transparent 100%);mask-image:linear-gradient(to left,#000 0%,#000 58%,transparent 100%)}
#collectionPage .home-hero::after{display:none}
.home-hero-copy{position:relative;z-index:1}
.home-hero .eyebrow{font-size:9px;letter-spacing:.24em;margin:0 0 12px}
#collectionPage .home-hero h1{margin:0;font-size:28px;line-height:1.5;letter-spacing:.05em;font-weight:400;max-width:none}
#collectionPage .home-hero p:last-child{font-size:14px;line-height:1.9;margin:12px 0 0;color:#4f5147}
.home-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.home-section-heading h2{font-size:22px;line-height:1.4;font-weight:400;margin:0}
.home-section-heading button{display:flex;align-items:center;gap:8px;border:0;background:transparent;padding:6px 0 6px 12px;min-height:44px;font-size:14px;color:var(--muted)}
.home-section-heading button span{font-family:Arial,sans-serif;font-size:25px}
.home-recent{margin:0 0 26px}
.home-recent-items{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 50px)/6);gap:10px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;padding-bottom:5px;scrollbar-width:thin;scrollbar-color:#cbc9bd transparent}
.home-recent-card{scroll-snap-align:start}
#collectionPage .item-photo{aspect-ratio:1;border-radius:var(--home-radius);background:#e8e4da;position:relative}
#collectionPage .item-photo img{width:100%;height:100%;object-fit:contain}
#collectionPage .item-card h3{font-weight:500;font-size:15px;line-height:1.5;margin:8px 0 3px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
#collectionPage .item-card p{font-size:12px;line-height:1.5;font-weight:400;color:#6e7165;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#collectionPage .item-card{border:0;background:transparent;min-width:0;border-radius:var(--home-radius)}
#collectionPage .placeholder{padding:10px;text-align:center;font-size:12px;line-height:1.5;font-family:"Yu Gothic","Meiryo",sans-serif}
#collectionPage .item-status-overlay{position:absolute;inset:auto 0 0;margin:0;border-radius:0;padding:4px;font-size:11px;line-height:1.3;background:#4a5848de;color:#fff;text-align:center;transform:none}
#collectionPage .home-search-bar{display:flex;gap:10px;margin:0 0 12px;scroll-margin-top:92px}
.home-search-field{display:flex;align-items:center;gap:12px;min-width:0;flex:1;border:1px solid #d9d5cb;border-radius:12px;background:#fffdf8;padding:0 14px}
.home-search-field>.home-icon{width:21px;height:21px}
.home-search-field .search-input-mount{min-width:0;flex:1}
#collectionPage .home-search-field input{width:100%;min-width:0;height:48px;border:0;background:transparent;padding:8px 0;font:16px/1.4 "Yu Gothic","Meiryo",sans-serif;border-radius:0;box-shadow:none}
#collectionPage .home-search-field:focus-within{outline:2px solid var(--moss);outline-offset:2px}
#collectionPage .home-search-field input:focus{outline:none}
#homeFilterToggle{width:50px;height:50px;min-width:50px;background:#fffdf8}
#homeFilterToggle[aria-expanded="true"]{background:#e7ecdf;border-color:var(--moss)}
.home-filter-panel{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:16px;margin:0 0 12px;border:1px solid var(--line);border-radius:12px;background:#eeeee5}
.home-filter-panel .sort-control{flex:1;min-width:0}
.home-filter-panel .sort-control select{font-size:16px;min-height:44px;max-width:100%;border-radius:6px}
.home-filter-panel>button{font-size:13px;min-height:44px;background:transparent}
#collectionPage .collection-tabs{margin:0 0 16px;border-radius:9px;background:#fffdf8}
#collectionPage .collection-tabs button{min-height:44px;padding:9px 12px;font-size:16px}
#collectionPage #categoryFilters{display:flex;gap:8px;align-items:start;margin:0 0 18px;max-width:none}
.home-category-options{display:flex;flex:1;min-width:0;gap:8px;overflow-x:auto;scrollbar-width:none}
.home-category-options::-webkit-scrollbar{display:none}
#categoryFilters .home-category-options button{min-height:40px;flex:0 0 auto;padding:7px 16px;font-size:15px;white-space:nowrap;background:#fffdf8;border-radius:20px}
#categoryFilters .home-category-options button.active{background:var(--moss);color:#fff;border-color:var(--moss)}
#categoryFilters .home-category-toggle{flex:0 0 40px;width:40px;height:40px;display:grid;place-items:center;padding:0;border-radius:50%;background:#fffdf8}
.home-categories-expanded .home-category-options{flex-wrap:wrap;overflow:visible}
.home-categories-expanded .home-category-toggle .home-icon{transform:rotate(180deg)}
#collectionPage .section-heading{margin:0 0 14px;gap:8px;justify-content:space-between}
#collectionPage .section-heading h2{font-size:16px;margin:0;line-height:1.5}
#collectionPage .section-heading>span{font:12px/1.4 "Yu Gothic","Meiryo",sans-serif;text-align:right}
#collectionPage .item-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:24px 12px}
.home-empty-state{grid-column:1/-1;padding:35px 20px;border:1px dashed #cecdbf;border-radius:12px;text-align:center;background:#f4f3eb}
.home-empty-state h3{font-size:20px;font-weight:400;margin:0 0 12px}
.home-empty-state p{font-size:14px;line-height:1.8;color:var(--muted);margin:0}
.home-empty-state button{margin-top:18px;min-height:44px}
#collectionPage .load-more{grid-column:1/-1;margin:10px 0;min-height:44px;border-radius:8px}
#collectionConnectionsPanel .sub-page-heading{margin:16px 0}
#collectionConnectionsPanel .sub-page-heading h1{display:none}
#collectionConnectionsPanel .sub-page-heading p{font-size:13px;line-height:1.7}
#homeAddDialog{width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:22px;border:1px solid var(--line);border-radius:20px;background:var(--paper);color:var(--ink);box-shadow:0 18px 70px #1e291d30}
#homeAddDialog::backdrop{background:#222a2266;backdrop-filter:blur(3px)}
.home-sheet-handle{display:none}
.home-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 22px;border:0;padding:0}
.home-sheet-heading p{font-size:12px;color:var(--muted);margin:0 0 5px}
.home-sheet-heading h2{margin:0;font-size:23px;font-weight:400}
.home-sheet-heading button{font:28px/1 Arial,sans-serif;border:0}
.home-add-options{display:grid;gap:10px}
#homeAddDialog .home-add-options button{width:100%;min-height:55px;display:flex;align-items:center;justify-content:space-between;text-align:left;border:1px solid var(--line);border-radius:10px;font-size:16px;padding:13px 16px;background:#fffdf8;color:var(--ink);white-space:normal;line-height:1.5}
#homeAddDialog .home-add-options button::after{content:'+';font:23px/1 Arial,sans-serif;color:var(--moss)}
#homeAddDialog #newItem{background:var(--moss);border-color:var(--moss);color:white}
#homeAddDialog #newItem::after{color:white}
#homeAddDialog #newInstructionHeader{width:100%;max-width:none;overflow:visible}
.home-redesign .app-footer{min-height:64px;padding:6px 12px calc(6px + env(safe-area-inset-bottom));background:#f8f6eef5}
.home-redesign .footer-nav{width:min(500px,100%);max-width:500px;gap:12px;overflow:visible}
.home-redesign .footer-nav button{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:8px;min-height:48px;padding:3px;font-size:12px;line-height:1.2;background:transparent;color:#74766b}
.home-redesign .footer-nav button.active{color:var(--moss);background:transparent;font-weight:600}
.home-redesign .footer-nav button.active .home-icon{stroke-width:2.2}
.home-redesign .footer-nav .home-icon{width:25px;height:25px}
.home-redesign .association-draft-toggle{top:auto;bottom:calc(82px + env(safe-area-inset-bottom));height:auto;max-height:44px}
.home-redesign .back-to-top,.home-redesign .page-back-float{bottom:calc(82px + env(safe-area-inset-bottom))}
.home-redesign :is(button,[role="button"]):focus-visible{outline:2px solid var(--moss);outline-offset:3px}
@media(hover:hover){#collectionPage .item-card:hover .item-photo{box-shadow:0 0 0 2px #7a8766}.home-icon-button:hover{background:#eeeee5}}
@media(max-width:1000px){#collectionPage .item-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.home-recent-items{grid-auto-columns:calc((100% - 30px)/4)}}
@media(max-width:600px){
  .home-redesign .site-header{min-height:72px;padding:10px 14px;gap:6px}
  .home-redesign .brand{gap:8px}
  .home-redesign .brand img{width:37px;height:37px}
  .home-redesign .brand strong{font-size:21px}
  .home-redesign .brand small{font-size:6.5px;letter-spacing:1.65px;margin-top:4px}
  .home-redesign .header-actions{gap:3px}
  .home-redesign .header-actions .home-icon-button{width:40px;height:40px;min-width:40px}
  .home-redesign .language-control select{height:40px;width:49px;padding:0 2px;font-size:12px;border-radius:9px}
  .home-redesign .logout-action{display:none}
  .home-redesign .app-shell{padding:0 16px 100px}
  #collectionPage .home-hero{height:180px;margin:0 -16px 12px;padding:20px 26px;background-position:center,right top;background-size:100% 100%,cover;background-image:linear-gradient(90deg,#f5f2e9f5 0%,#f5f2e9e8 28%,#f5f2e9ab 43%,#f5f2e900 65%),var(--home-hero-mobile);background-repeat:no-repeat}
  #collectionPage .home-hero::before{display:none}
  .home-hero .eyebrow{display:none}
  #collectionPage .home-hero h1{font-size:20px;line-height:1.6;letter-spacing:.02em}
  #collectionPage .home-hero p:last-child{font-size:12px;line-height:1.8;margin-top:10px}
  .home-section-heading{margin:0 0 8px}
  .home-section-heading h2{font-size:20px}
  .home-section-heading button{font-size:12px;min-height:36px}
  .home-recent{margin-bottom:12px}
  .home-recent-items{grid-auto-columns:calc((100% - 20px)/3);gap:10px;align-items:start}
  #collectionPage .item-card h3{font-size:13px;line-height:1.5;margin:6px 0 2px}
  #collectionPage .item-card p{font-size:11px}
  #collectionPage .home-recent-card h3{display:block;white-space:nowrap;text-overflow:ellipsis}
  #collectionPage .home-search-bar{gap:8px;scroll-margin-top:84px;margin-bottom:10px}
  .home-search-field{gap:8px;padding:0 10px;border-radius:10px}
  .home-search-field>.home-icon{width:20px;height:20px}
  #collectionPage .home-search-field input{height:46px;font-size:16px}
  #homeFilterToggle{height:48px;width:46px;min-width:46px;border-radius:10px}
  #collectionPage .collection-tabs{margin-bottom:12px}
  #collectionPage .collection-tabs button{font-size:15px;min-height:40px;padding:8px}
  #collectionPage #categoryFilters{margin-bottom:16px;gap:6px}
  .home-category-options{gap:7px}
  #categoryFilters .home-category-options button{padding:6px 13px;font-size:14px;min-height:38px}
  #categoryFilters .home-category-toggle{width:38px;height:38px;flex-basis:38px}
  #collectionPage .item-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 10px}
  #collectionPage .section-heading{margin-bottom:10px}
  #collectionPage .section-heading h2{font-size:14px}
  #collectionPage .item-status-overlay{font-size:10px;padding:3px}
  #homeAddDialog{position:fixed;inset:auto 0 0;transform:none;width:100%;max-width:100%;max-height:calc(100dvh - 40px);margin:0;padding:10px 20px calc(24px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;border-bottom:0}
  .home-sheet-handle{display:block;width:36px;height:4px;background:#d4d3c6;border-radius:4px;margin:0 auto 20px}
  .home-filter-panel .sort-control{width:100%;flex-basis:100%;flex-wrap:wrap;gap:8px}
  .home-filter-panel .sort-control select{width:100%;min-width:0;flex:1}
  html[lang="en"] .home-redesign .brand strong{font-size:15px;letter-spacing:.02em}
  html[lang="en"] #collectionPage .home-hero h1{font-size:18px;letter-spacing:0}
}
@media(max-width:359px){
  .home-redesign .site-header{padding:10px;gap:2px}
  .home-redesign .brand{gap:6px}
  .home-redesign .brand strong{font-size:18px}
  .home-redesign .brand img{width:32px;height:32px}
  .home-redesign .brand small{font-size:5.5px;letter-spacing:1.3px}
  .home-redesign .header-actions{gap:1px}
  .home-redesign .header-actions .home-icon-button{width:38px;min-width:38px;height:38px}
  .home-redesign .language-control select{width:44px}
  .home-redesign .app-shell{padding-left:12px;padding-right:12px}
  #collectionPage .home-hero{margin-left:-12px;margin-right:-12px;padding:20px 22px;height:180px;background-image:linear-gradient(90deg,#f5f2e9f5 0%,#f5f2e9e8 28%,#f5f2e9b8 46%,#f5f2e900 70%),var(--home-hero-image)}
  #collectionPage .home-hero h1{font-size:18px}
  #collectionPage .item-grid{gap:18px 8px}
  #collectionPage .item-card h3{font-size:12px}
  html[lang="en"] .home-redesign .brand strong{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.home-redesign *{scroll-behavior:auto!important}}
#homeAddDialog .home-add-options button[data-home-action="arrangement"],#homeAddDialog .home-add-options button[data-home-action="choose"]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 10px}
#homeAddDialog .home-add-options button[data-home-action="arrangement"] small,#homeAddDialog .home-add-options button[data-home-action="choose"] small{grid-column:1;display:block;color:#495649;font:13px/1.5 "Yu Gothic","Meiryo",sans-serif}
#homeAddDialog .home-add-options button[data-home-action="arrangement"]::after,#homeAddDialog .home-add-options button[data-home-action="choose"]::after{grid-column:2;grid-row:1/3}
.other-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 0 22px}
.other-shortcuts button{min-height:52px;padding:10px 12px;text-align:left;font:16px/1.45 "Yu Gothic","Meiryo",sans-serif;color:#263e2d;background:#fffdf8;border:1px solid var(--line);border-radius:9px}
.other-shortcuts button:focus-visible{outline:2px solid var(--moss);outline-offset:2px}
#collectionPage .item-card{cursor:pointer}
@media(max-width:600px){#categoryFilters .home-category-options button{min-height:44px}#categoryFilters .home-category-toggle{width:44px;height:44px;flex-basis:44px}#collectionPage .item-card h3{font-size:14px}#collectionPage .item-card p{font-size:12px}}
@media(max-width:359px){.other-shortcuts{grid-template-columns:1fr}#collectionPage .item-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#collectionPage .item-card h3{font-size:14px}}
