:root {
  --page: #eaf4f8;
  --card: #ffffff;
  --ink: #426783;
  --muted: #7894a4;
  --accent: #78a9c7;
  --shadow: 0 10px 28px rgba(69, 112, 122, 0.11);
}

@font-face { font-family: "Klee One Local"; src: url("./assets/fonts/klee-one.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Yomogi Local"; src: url("./assets/fonts/yomogi.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }

* { box-sizing: border-box; }
.page-back { display:grid !important; width:38px !important; min-width:38px; height:38px !important; min-height:38px !important; place-items:center; padding:0 !important; border:0; border-radius:50% !important; color:var(--page-back-color,var(--ink)) !important; background:rgba(255,255,255,.72) !important; box-shadow:0 5px 15px rgba(69,112,122,.1); font:24px/1 sans-serif !important; text-decoration:none; }
body:has(.login-screen:not([hidden])) { min-height: 100vh; display: grid; place-items: center; }
.login-screen { width: min(360px, calc(100% - 40px)); padding: 34px 24px; border: 1px solid rgba(211,231,239,.8); border-radius: 28px; color: var(--ink); background: rgba(246,251,253,.96); box-shadow: var(--shadow); text-align: center; }
.login-screen img { width: 58px; height: 42px; object-fit: contain; }
.login-screen h1 { margin: 4px 0 2px; font-size: 30px; }
.login-screen p { margin: 0 0 20px; font-size: 13px; }
.login-screen small { display: block; margin-top: 12px; color: var(--muted); font-size: 11px; }
.login-screen .login-links { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.login-links a { color: #557b89; text-underline-offset: 2px; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--page); font-family: "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "M PLUS Rounded 1c", "Hiragino Sans", "Yu Gothic", sans-serif; }
.home { width: min(440px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 16px; }
.topbar { position: relative; display: flex; align-items: flex-start; justify-content: center; text-align: center; }
.title-cloud { position: absolute; top: 54px; width: 38px; height: 14px; border-radius: 16px; background: rgba(255,255,255,.78); box-shadow: 10px -6px 0 -3px rgba(255,255,255,.78), 20px 0 0 -4px rgba(255,255,255,.78); }
.title-cloud-left { left: 2px; }
.title-cloud-right { right: 2px; transform: scaleX(-1); }
.brand-sprout { width: 84px; height: 60px; margin: -8px auto -12px; object-fit: contain; }
h1 { margin: 0; font-size: clamp(30px, 7vw, 42px); font-weight: 700; letter-spacing: .03em; }
.subtitle { margin: 4px 0 0; color: var(--ink); font-size: 13px; font-weight: 500; letter-spacing: .08em; }
.icon-button { position: absolute; top: 2px; right: 0; width: 42px; height: 42px; padding: 5px; border: 1px solid rgba(211, 231, 239, .7); border-radius: 50%; background: rgba(246, 251, 253, .94); box-shadow: var(--shadow); cursor: pointer; text-decoration: none; }
.icon-button img { width: 100%; height: 100%; object-fit: contain; }
.comment { position: relative; display: flex; min-height: 118px; align-items: center; justify-content: center; gap: 14px; margin: -2px 0 8px; overflow: hidden; border-radius: 0 0 28px 28px; background: var(--page) url("./assets/backgrounds/home-landscape-v1.png") center bottom / auto 190px no-repeat; background-clip: padding-box; }
.comment::after { display: none; }
.comment-frog { position: absolute; bottom: 9px; left: 88px; z-index: 1; width: 78px; height: 78px; object-fit: contain; object-position: center; }
.speech { position: absolute; top: 24px; left: 43%; z-index: 1; max-width: 54%; padding: 12px 20px; border-radius: 24px; background: rgba(255,255,255,.8); color: var(--ink); font-family: "Yomogi Local", "Hiragino Maru Gothic ProN", cursive; font-size: 16px; font-weight: 600; line-height: 1.5; line-break: strict; word-break: normal; overflow-wrap: break-word; text-align: center; transform: rotate(-3deg); }
.speech p { margin: 0; font-weight: 500; }
.comment-choices { display: none; gap: 5px; justify-content: center; margin-top: 8px; }
.comment-choices[hidden] { display: none; }
.comment-choices button { padding: 4px 8px; border: 1px solid #c7dfe7; border-radius: 999px; color: var(--ink); background: #f3fafc; font: 600 11px "Yomogi Local", sans-serif; }
.comment.has-choices { min-height: 174px; }
.comment.has-choices .comment-choices { display: flex; flex-wrap: wrap; }
.comment.has-choices + .tile-grid { margin-top: 6px; }
.has-comment-choices .topbar, .has-comment-long .topbar { transform: none; }
.has-comment-choices .comment { min-height: 112px; margin-bottom: 8px; }
.has-comment-choices .comment, .has-comment-long .comment { overflow: visible; }
@media (max-width: 440px) { .has-comment-choices .comment { min-height: 132px; margin-bottom: 0; } }
.has-comment-choices .speech { top: 8px; left: 43%; max-width: 54%; background: rgba(255,255,255,.9); transform: none; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
.has-comment-choices .speech, .has-comment-long .speech { text-align: left; }
.has-comment-choices .comment-choices { display: flex; }
.has-comment-choices .comment-frog { top: 31px; bottom: auto; left: 88px; }
.has-comment-choices .tile-grid { margin-top: 6px; }
.has-comment-long .comment { min-height: 112px; margin-bottom: 0; }
.has-comment-long .speech { position: absolute; top: 8px; left: 43%; max-width: 54%; background: rgba(255,255,255,.9); transform: none; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
.has-comment-long .comment-frog { top: 31px; bottom: auto; left: 88px; }
.has-comment-long .tile-grid { margin-top: 6px; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; min-height: 136px; flex-direction: column; align-items: center; justify-content: center; padding: 11px 8px 10px; border: 1px solid rgba(211, 231, 239, .7); border-radius: 23px; color: var(--ink); background: rgba(246, 251, 253, .94); box-shadow: var(--shadow); text-align: center; text-decoration: none; font-size: 15px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover, .tile:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(69, 112, 122, .18); outline: none; }
.tile-art { display: grid; width: 68px; height: 68px; margin-bottom: 5px; place-items: center; border-radius: 50%; background: #d9edf5; }
.tile-art img { width: 58px; height: 58px; object-fit: contain; }
.tile small { color: #7390a0; font-size: 10px; font-weight: 400; letter-spacing: .03em; }
.tile-camera .tile-art { background: #d9edf5; } .tile-calendar .tile-art { background: #e1f0e2; } .tile-todo .tile-art { background: #f8dedb; } .tile-fridge .tile-art { background: #d9edf5; } .tile-expense .tile-art { background: #e9e3fa; } .tile-recipe .tile-art { background: #fff2d7; } .tile-fitness .tile-art { background: #e3f0ea; } .tile-health .tile-art { background: #f8dedb; }
.footer-note { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 0; padding: 12px 0 14px; color: var(--accent); background: url("./assets/backgrounds/footer-landscape-v3.png") center bottom / 100% 86px no-repeat; text-align: center; }
.footer-note p { margin: 0; font-family: "Yomogi Local", "Hiragino Maru Gothic ProN", cursive; font-size: 14px; font-weight: 600; line-height: 1.5; }
.auth-button { display: block; margin: 8px auto 0; padding: 7px 14px; border: 1px solid #c7dfe7; border-radius: 999px; color: var(--ink); background: rgba(246,251,253,.9); font: 600 12px "Yomogi Local", sans-serif; cursor: pointer; }
.auth-button:disabled { opacity: .6; cursor: wait; }
.pwa-login-card { width:min(360px,calc(100% - 40px)); padding:28px 22px; border:1px solid rgba(211,231,239,.85); border-radius:26px; background:rgba(246,251,253,.96); box-shadow:var(--shadow); text-align:center; }
.pwa-login-card img { display:block; width:64px; height:64px; margin:0 auto 4px; object-fit:contain; }
.pwa-login-card p { margin:4px 0 14px; line-height:1.6; }
.pwa-login-card small { display:block; margin-top:12px; color:var(--muted); font-size:11px; line-height:1.55; }
.prototype-note { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.has-comment-choices .topbar, .has-comment-long .topbar { transform: none !important; }
.has-comment-choices .tile-grid, .has-comment-long .tile-grid { margin-top: 6px; }
.has-comment-choices .tile-grid, .has-comment-long .tile-grid { margin-top: 0 !important; }
.has-comment-choices .comment, .has-comment-long .comment { margin-bottom: 8px; }
.has-comment-choices .comment { min-height: 112px; margin-bottom: 0; }
@media (max-width: 440px) { .has-comment-long .comment { min-height: 122px; margin-bottom: 0; } .has-comment-long .tile-grid { margin-top: 4px; } }
.has-comment-choices .comment { margin-bottom: 8px; }
.has-comment-long .comment { margin-bottom: 8px; }
.has-comment-choices .tile-grid, .has-comment-long .tile-grid { margin-top: 0 !important; }
@media (max-width: 440px) { .home { width: min(100% - 22px, 440px); padding-top: 20px; } .brand-sprout { width: 72px; height: 52px; margin: -6px auto -10px; } .comment { min-height: 112px; margin-bottom: 0; background-size: auto 175px; } .comment-frog { left: 64px; width: 72px; height: 72px; } .speech { top: 20px; left: 42%; max-width: 56%; } .has-comment-choices .topbar { transform: none !important; } .has-comment-choices .comment { min-height: 132px; } .has-comment-choices .comment-frog { top: 35px; left: 64px; } .has-comment-choices .speech { top: 8px; left: 42%; max-width: 56%; } .has-comment-choices .tile-grid { margin-top: 6px; } .title-cloud { top: 50px; transform: scale(.86); } .title-cloud-right { transform: scaleX(-1) scale(.86); } .tile { min-height: 132px; } .tile-art { width: 62px; height: 62px; } .tile-art img { width: 53px; height: 53px; } }

/* コメントが伸びても、グループ1は固定し、グループ2の領域だけを広げる */
.comment { background-size: auto max(175px, 100%); }
.has-comment-choices .tile-grid, .has-comment-long .tile-grid { margin-top: 8px !important; }
.has-comment-choices .comment-frog, .has-comment-long .comment-frog { top: auto; bottom: 9px; }
.comment { overflow: hidden; }
.update-notice { position: fixed; top: 12px; left: 50%; z-index: 20; transform: translateX(-50%); padding: 8px 14px; border: 1px solid #c7dfe7; border-radius: 999px; color: #426783; background: #fff; box-shadow: var(--shadow); font: 600 12px "Yomogi Local", sans-serif; cursor: pointer; }
