.town{--town-lot-size: 60px;--town-lot-gap: 6px;--town-street-label-width: 4.5em;--town-column-gap: 16px;--town-resident-crop-y: 76.3%;max-width:1200px;margin:0 auto;padding:1rem}@media(min-width:768px){.town{--town-lot-size: 64px;--town-lot-gap: 8px}}@media(min-width:1024px){.town{--town-lot-size: 86px;--town-lot-gap: 10px}}@media(min-width:1280px){.town{--town-lot-size: 100px;--town-lot-gap: 10px}}.town-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.town-header__name{font-size:clamp(1.25rem,4vw,2rem);font-weight:700;color:#4e342e}.town-header__error{margin-bottom:.5rem;font-size:.875rem;font-weight:700;color:#c62828}.town-bell{min-height:44px;padding:.25rem .875rem;border:none;border-radius:999px;background:#ffca28;color:#4e342e;font-size:clamp(.875rem,3vw,1.125rem);font-weight:700;white-space:nowrap;cursor:pointer;box-shadow:0 2px #f9a825}.town--celebrating .town-streets,.town--celebrating .town-bell{pointer-events:none}.town-streets{display:grid;gap:var(--town-lot-gap)}@media(min-width:768px){.town-streets{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,auto);grid-auto-flow:column;column-gap:var(--town-column-gap);row-gap:calc(var(--town-lot-gap) * 1.5);align-items:start}}.town-street{display:flex;align-items:center;gap:.5rem}@media(min-width:768px){.town-street{flex-direction:column;align-items:stretch;gap:2px}}.town-street__label{flex:0 0 var(--town-street-label-width);font-size:clamp(.7rem,2.2vw,1rem);font-weight:700;color:#6d4c41;text-align:right;white-space:nowrap}@media(min-width:768px){.town-street__label{flex:0 0 auto;text-align:left}}.town-street__lots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--town-lot-gap);max-width:calc(5 * var(--town-lot-size) + 4 * var(--town-lot-gap))}.town-lot-wrap{position:relative;align-self:start}.town-lot{position:relative;width:100%;aspect-ratio:1 / 1;padding:0;border:none;border-radius:12px;background:#e8f5e9;cursor:pointer;min-width:44px;min-height:44px}.town-lot--vacant{background:#f1f8e9;box-shadow:0 2px #c5e1a5}.town-lot--waiting{background:#fff8e1;box-shadow:0 2px #ffe082}.town-lot--house{background:#e8f5e9;box-shadow:0 2px #a5d6a7}@media(hover:hover){.town-lot:hover{filter:brightness(1.05)}}.town-lot__art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}.town-lot__sign-text{position:absolute;left:22%;top:22%;width:56%;height:40%;display:flex;align-items:center;justify-content:center;font-size:calc(var(--town-lot-size) * .3);font-weight:700;color:#4e342e;pointer-events:none}.town-lot__truck{position:absolute;right:-6px;top:-6px;width:calc(var(--town-lot-size) * .42);height:calc(var(--town-lot-size) * .42);object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 2px rgba(0,0,0,.25))}.town-lot__name{max-width:100%;margin:2px 0 0;padding:1px 2px;border-radius:6px;background:#fff8e1;color:#4e342e;font-size:calc(var(--town-lot-size) * .18);font-weight:700;line-height:1.3;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.town-resident{position:absolute;left:50%;bottom:4%;width:62%;transform:translate(-50%);aspect-ratio:441 / 278;background-image:var(--town-card-url);background-size:100% auto;background-position:center var(--town-resident-crop-y);background-repeat:no-repeat;pointer-events:none}.town-lot[data-hiragana=つ]{--town-resident-crop-y: 71.8%}.town-bubble{--town-popup-bg: #fff;width:max(180px,calc(var(--town-lot-size) * 2.4));padding:.5rem;border-radius:16px;background:#fff;box-shadow:0 6px 20px #0003;text-align:center}.town-bubble__card{width:100%;max-height:46vh;object-fit:contain;border-radius:8px}.town-bubble__name{margin-top:.25rem;font-size:clamp(.875rem,2.5vw,1.125rem);font-weight:700;color:#4e342e}.town-bubble__name-button{margin-top:.375rem;padding:.25rem .75rem;border:none;border-radius:999px;background:#ffcc80;color:#4e342e;font-size:clamp(.75rem,2.2vw,1rem);font-weight:700;cursor:pointer;min-height:44px}.town-bubble__name-button:disabled{background:#eee;color:#9e9e9e;cursor:not-allowed}.town-popup{position:absolute;left:50%;z-index:10;transform:translate(calc(-50% + var(--town-popup-shift, 0px)))}.town-popup--up{bottom:calc(100% + 10px)}.town-popup--down{top:calc(100% + 10px)}.town-popup:after{content:"";position:absolute;left:calc(50% - var(--town-popup-shift, 0px));transform:translate(-50%);border:10px solid transparent}.town-popup--up:after{top:100%;border-top-color:var(--town-popup-bg)}.town-popup--down:after{bottom:100%;border-bottom-color:var(--town-popup-bg)}.town-moving{--town-popup-bg: #fffdf7;width:max(200px,calc(var(--town-lot-size) * 2.8));padding:.625rem;border-radius:16px;background:#fffdf7;box-shadow:0 6px 20px #0003;text-align:center}.town-moving__icon{font-size:1.75rem;line-height:1}.town-moving__text{margin:.25rem 0 .5rem;font-size:clamp(.8125rem,2.8vw,1.0625rem);font-weight:700;color:#4e342e}.town-moving__actions{display:flex;justify-content:center;gap:6px}.town-moving__later,.town-moving__action{min-height:44px;padding:.25rem .875rem;border:none;border-radius:999px;font-size:clamp(.8125rem,2.8vw,1.0625rem);font-weight:700;cursor:pointer}.town-moving__later{background:#eee;color:#757575}.town-moving__action{flex:1 1 auto;max-width:10rem;background:#43a047;color:#fff}.town-moving__action:disabled{background:#eee;color:#9e9e9e;cursor:not-allowed}.town-guide{width:fit-content;max-width:100%;margin:0 0 .75rem;padding:.5rem 1rem;border-radius:14px;background:#fff59d;color:#4e342e;font-size:clamp(.9rem,2.4vw,1.125rem);font-weight:700;box-shadow:0 4px 12px #00000026}.town-lot-wrap--celebrate .town-lot__truck{animation:town-truck-arrive .6s ease-out both,town-truck-leave .4s .6s ease-in both}.town-lot-wrap--celebrate .town-lot__art{animation:town-house-pop .5s .5s cubic-bezier(.34,1.56,.64,1) both}.town-lot-wrap--celebrate .town-resident{animation:town-resident-drop .4s .9s ease-out both}.town-lot-wrap--celebrate .town-lot__name{animation:town-sign-show .3s 1.2s ease-out both}@keyframes town-truck-arrive{0%{transform:translate(180%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes town-truck-leave{0%{transform:translate(0);opacity:1}to{transform:translate(-60%);opacity:0}}@keyframes town-house-pop{0%{transform:scale(.1)}60%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes town-resident-drop{0%{transform:translate(-50%,-40%);opacity:0}to{transform:translate(-50%);opacity:1}}@keyframes town-sign-show{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.town-lot-wrap--celebrate .town-lot__truck,.town-lot-wrap--celebrate .town-lot__art,.town-lot-wrap--celebrate .town-resident,.town-lot-wrap--celebrate .town-lot__name{animation:none}}.town-notices{position:fixed;inset:0;z-index:90;display:flex;align-items:flex-end;background:#0006}.town-notices__sheet{width:100%;max-height:80%;overflow-y:auto;padding:1rem;border-radius:20px 20px 0 0;background:#fffdf7;box-shadow:0 -8px 30px #00000040}.town-notices__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}.town-notices__title{font-size:clamp(1.125rem,4vw,1.5rem);font-weight:700;color:#4e342e}.town-notices__close{min-width:44px;min-height:44px;border:none;background:transparent;font-size:1.25rem;color:#8d6e63;cursor:pointer}.town-notices__list{margin:0 0 .75rem;padding:0;list-style:none}.town-notices__item{display:flex;align-items:center;gap:.5rem;padding:.5rem 0;border-top:1px solid #efebe9}.town-notices__icon{font-size:1.5rem;line-height:1}.town-notices__text{flex:1 1 auto;font-size:clamp(.875rem,3vw,1.125rem);font-weight:700;color:#4e342e}.town-notices__action{flex:0 0 auto;min-height:44px;padding:.25rem 1rem;border:none;border-radius:999px;background:#43a047;color:#fff;font-size:clamp(.875rem,3vw,1.125rem);font-weight:700;cursor:pointer}.town-notices__all{width:100%;min-height:44px;padding:.625rem;border:none;border-radius:14px;background:#ffb74d;color:#4e342e;font-size:clamp(.875rem,3vw,1.125rem);font-weight:700;cursor:pointer}.town-notices__action:disabled,.town-notices__all:disabled{background:#eee;color:#9e9e9e;cursor:not-allowed}.town-naming{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;padding:1rem;background:#00000073}.town-naming__panel{flex:0 1 auto;min-height:0;overflow-y:auto;width:min(100%,560px);padding:1rem;border-radius:20px;background:#fffdf7;box-shadow:0 10px 40px #0000004d;text-align:center}.town-naming__card{flex:0 0 auto;width:min(32vw,130px);max-height:28vh;aspect-ratio:441 / 678;object-fit:contain;border-radius:12px;box-shadow:0 8px 24px #0006}@media(min-width:480px){.town-naming{flex-direction:row}.town-naming__card{width:min(30vw,300px);max-height:84vh}.town-naming__panel{max-height:100%}}.town-naming__title{margin-bottom:.75rem;font-size:clamp(1rem,3.2vw,1.375rem);font-weight:700;line-height:1.4;color:#4e342e}.town-naming__slots{display:flex;justify-content:center;gap:6px;margin-bottom:.75rem}.town-naming__slot{display:flex;align-items:center;justify-content:center;width:clamp(44px,13vw,64px);aspect-ratio:1 / 1;border:3px solid #d7ccc8;border-radius:12px;background:#fff;font-size:clamp(1.25rem,6vw,2rem);font-weight:700;color:#4e342e}.town-naming__keys{display:grid;gap:4px;margin-bottom:.75rem}.town-naming__row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.town-naming__key{min-height:44px;padding:0;border:none;border-radius:10px;background:#ffe0b2;color:#4e342e;font-size:clamp(1rem,4.5vw,1.5rem);font-weight:700;cursor:pointer}@media(hover:hover){.town-naming__key:not(:disabled):hover{filter:brightness(1.05)}}.town-naming__key:disabled{background:#eee;color:#bdbdbd;cursor:not-allowed}.town-naming__error{margin-bottom:.5rem;color:#c62828;font-size:.875rem;font-weight:700}.town-naming__actions{position:sticky;bottom:-1rem;z-index:1;display:flex;justify-content:center;gap:8px;margin:0 -1rem -1rem;padding:.5rem 1rem 1rem;background:#fffdf7;box-shadow:0 -8px 12px #fffdf7f2}.town-naming__button{min-height:44px;padding:.5rem 1rem;border:none;border-radius:999px;font-size:clamp(.875rem,3vw,1.25rem);font-weight:700;color:#fff;cursor:pointer}.town-naming__button:disabled{background:#eee;color:#9e9e9e;cursor:not-allowed}.town-naming__button--quit{background:#9e9e9e}.town-naming__button--erase{background:#ffb74d}.town-naming__button--decide{flex:1 1 auto;max-width:14rem;background:#43a047}.town-playground{display:flex;align-items:center;gap:.75rem;margin-top:1rem;padding:.5rem 1rem;border-radius:16px;background:#e1f5fe;color:#01579b;font-size:clamp(1rem,3vw,1.5rem);font-weight:700;text-decoration:none}.town-playground__art{width:calc(var(--town-lot-size) * 1.2);height:calc(var(--town-lot-size) * 1.2);object-fit:contain}
