/* aoma's town: walkable RPG map on the first homepage. */
body.layout--creator-home { background: #f5f3e8; color: #283e3b; }
.layout--creator-home .masthead { background: #fcfaf2; border-bottom-color: #dcded0; }
.layout--creator-home .greedy-nav a, .layout--creator-home .greedy-nav .site-title { color: #283e3b; }
.layout--creator-home .page__footer { background: #e9eddf; border-top-color: #d2daca; }
#main.creator-home { --blue: #396d60; --ink: #283e3b; --muted: #6b7469; --line: #d8ddcd; max-width: 1200px; }
.creator-home a:focus-visible { outline: 3px solid #ce6e43; outline-offset: 4px; }

.rpg-town { --rpg-ink: #22302c; --rpg-paper: #fffbea; --rpg-font: "DotGothic16", "Hiragino Kaku Gothic ProN", system-ui, sans-serif; padding-bottom: 12px; }
.rpg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 34px 0 22px; }
.rpg-eyebrow { font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; color: #57764f; margin-bottom: 10px !important; }
.creator-home .rpg-head h1 { font-family: var(--rpg-font); font-weight: 400; font-size: clamp(25px, 3vw, 36px); line-height: 1.45; letter-spacing: .02em; white-space: normal; }
.rpg-lead { color: #5f6d60; font-size: 13px; margin-top: 8px !important; line-height: 1.8; }
.rpg-break { display: none; }
.creator-home .rpg-skip { white-space: nowrap; font-size: 12px; color: #4e6b5f; padding-bottom: 4px; }

.rpg-frame { border: 4px solid var(--rpg-ink); background: var(--rpg-ink); box-shadow: 6px 6px 0 #cdd5bf; }
.rpg-stage { position: relative; height: clamp(380px, 68vh, 620px); overflow: hidden; background: #2c5f3d; outline: none; font-family: var(--rpg-font); }
.rpg-stage:focus-visible { box-shadow: inset 0 0 0 3px #ffd75f; }
.rpg-stage canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.rpg-hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.rpg-area, .rpg-found { background: #22302ce6; color: #fff8dc; border: 2px solid #fff8dc; padding: 5px 12px 4px; font-size: 14px; line-height: 1.3; letter-spacing: .04em; box-shadow: 3px 3px 0 #0000004d; }
.rpg-area.is-new { animation: rpg-area-in .5s steps(4, end); }
.rpg-found b { font-weight: 400; color: #ffd75f; }
.rpg-found i { font-style: normal; }
.rpg-found.is-complete { background: #8b5e3ae6; }
@keyframes rpg-area-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

.rpg-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #22302cc7; color: #f3efd6; padding: 4px 12px 3px; font-size: 12px; pointer-events: none; }
.rpg-hint.is-target { background: #fff0b0; color: #22302c; border: 2px solid #8b5e3a; }
.rpg-hint:empty { display: none; }
.is-talking .rpg-hint { display: none; }

.rpg-dialog { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 14px; align-items: flex-start; max-height: calc(100% - 64px); padding: 16px 20px 18px; background: #1f2b3ef2; color: #fbf8ea; border: 3px solid #fbf8ea; outline: 3px solid #1f2b3e; box-shadow: 0 6px 0 #00000040; cursor: pointer; }
.rpg-dialog[hidden] { display: none; }
.rpg-dialog__portrait { width: 56px; height: 56px; flex: 0 0 56px; image-rendering: pixelated; background: #3e5a7a; border: 2px solid #fbf8ea; }
.rpg-dialog__portrait[hidden] { display: none; }
.rpg-dialog__body { flex: 1; min-width: 0; display: flex; flex-direction: column; max-height: 100%; }
.rpg-dialog__name { font-size: 13px; color: #ffd75f; letter-spacing: .08em; }
.creator-home .rpg-dialog__text { font-size: 17px; line-height: 1.75; margin-top: 4px; min-height: 1.75em; }
.rpg-dialog__next { position: absolute; right: 16px; bottom: 8px; font-size: 12px; color: #ffd75f; animation: rpg-blink 1s steps(2, start) infinite; }
.rpg-dialog.is-last.has-choices .rpg-dialog__next { display: none; }
@keyframes rpg-blink { to { visibility: hidden; } }

.rpg-choices { list-style: none; margin: 10px 0 0; padding: 0 4px 0 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; cursor: default; overscroll-behavior: contain; }
.rpg-choices:empty { display: none; }
.rpg-choices li { margin: 0; }
.creator-home .rpg-choice { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px 6px 26px; background: transparent; border: 0; color: #fbf8ea; font: inherit; font-size: 14px; line-height: 1.45; text-align: left; cursor: pointer; }
.creator-home .rpg-choice:hover, .creator-home .rpg-choice:focus-visible { background: #ffffff1f; outline: none; }
.rpg-choice::before { content: '▶'; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #ffd75f; visibility: hidden; }
.rpg-choice:hover::before, .rpg-choice:focus-visible::before, .rpg-choice:focus::before { visibility: visible; }
.rpg-choice img { width: 72px; height: 40px; object-fit: cover; flex: 0 0 72px; border: 2px solid #fbf8ea; image-rendering: auto; background: #3e5a7a; }
.rpg-choice__label { min-width: 0; overflow-wrap: anywhere; }
.rpg-choice__label small { display: block; font-size: 11px; color: #b9c6d6; margin-top: 1px; }
.rpg-choice__ext { margin-left: auto; color: #b9c6d6; }
.creator-home .rpg-choice--close { color: #b9c6d6; }

.rpg-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rpg-noscript { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: #22302cee; color: #fff8dc; font-size: 15px; line-height: 1.9; }

.rpg-pad { display: none; }
@media (pointer: coarse) {
  .rpg-pad { position: absolute; left: 12px; right: 12px; bottom: 44px; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
  .rpg-pad button { pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; font-family: var(--rpg-font); color: #fff8dc; background: #22302c99; border: 2px solid #fff8dccc; padding: 0; }
  .rpg-pad button:active { background: #22302cdd; }
  .rpg-pad__cross { position: relative; width: 126px; height: 126px; }
  .rpg-pad__cross button { position: absolute; width: 42px; height: 42px; font-size: 14px; }
  .rpg-pad__up { left: 42px; top: 0; }
  .rpg-pad__left { left: 0; top: 42px; }
  .rpg-pad__right { left: 84px; top: 42px; }
  .rpg-pad__down { left: 42px; top: 84px; }
  .rpg-pad__a { width: 64px; height: 64px; border-radius: 50%; font-size: 22px; margin-bottom: 10px; }
  .is-talking .rpg-pad { display: none; }
}

.rpg-warp { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); border: 4px solid var(--rpg-ink); border-top: 0; background: var(--rpg-paper); font-family: var(--rpg-font); }
.rpg-warp__label { display: grid; place-items: center; padding: 0 16px; background: var(--rpg-ink); color: #ffd75f; font-size: 12px; letter-spacing: .12em; }
.creator-home .rpg-warp a { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 16px; font-size: 15px; border-left: 2px dashed #d5d0b4; }
.creator-home .rpg-warp a:first-of-type { border-left: 0; }
.creator-home .rpg-warp a:hover, .creator-home .rpg-warp a:focus-visible { background: #fff0b0; }
.creator-home .rpg-warp a:focus-visible { outline-offset: -5px; }
.rpg-warp small { font-size: 10px; color: #7f8a78; margin-left: auto; letter-spacing: .08em; }
.rpg-warp__dot { width: 12px; height: 12px; flex: 0 0 12px; border: 2px solid var(--rpg-ink); }
.rpg-warp__dot--apps { background: #d9734e; }
.rpg-warp__dot--games { background: #7458cf; }
.rpg-warp__dot--library { background: #4c7fbf; }
.rpg-warp__dot--house { background: #c95757; }
.rpg-help { margin: 14px 0 26px !important; color: #737e6e; font-size: 11px; line-height: 1.7; }

/* Familiar, readable work cards remain below the map. */
.creator-home .home-section { padding: 42px 0 48px; }
.creator-home .eyebrow { color: #57764f; }
.creator-home .section-heading h2 { font-size: 23px; }
.creator-home .app-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.creator-home .app-card { border-color: #c9d2bd; border-radius: 3px; box-shadow: 3px 3px 0 #e1e5d6; }
.creator-home .app-card:hover { border-color: #69856c; }
.creator-home .app-visual { height: 190px; padding: 18px; }
.creator-home .app-visual img { border-radius: 2px; box-shadow: 0 3px 8px #263d361a; }
.creator-home .app-visual--quickboard { background: #dde8d8; }
.creator-home .app-visual--kinenbi { background: #e6ecdf; }
.creator-home .app-visual--stripe { background: #ebe5dc; }
.creator-home .app-card__body { padding: 21px 21px 23px; }
.creator-home .card-title h3 { font-size: 19px; }
.creator-home .app-card__body p { font-size: 11px; }
.creator-home .game-pick__image, .creator-home .game-day { border-radius: 2px; }
.creator-home .game-pick__image { border-color: #aab99e; }
.creator-home .game-day { background: #fff7dd; color: #334c44; border-color: #d8d7b4; }
.creator-home .home-about { background: #e9eddf; border: 1px solid #cbd5be; border-radius: 3px; scroll-margin-top: 28px; }
.creator-home .home-about > img { border-radius: 0; image-rendering: pixelated; }
.creator-home #apps { scroll-margin-top: 20px; }

@media (max-width: 900px) {
  .rpg-warp { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rpg-warp__label { display: none; }
  .creator-home .rpg-warp a { padding: 10px 12px; font-size: 13px; }
  .rpg-warp small { display: none; }
  .creator-home .app-grid { gap: 14px; }
  .creator-home .app-visual { height: 145px; padding: 14px; }
  .creator-home .app-card__body { padding: 17px 16px; }
  .creator-home .card-title h3 { font-size: 16px; }
}
@media (max-width: 640px) {
  #main.creator-home { padding: 0 16px; }
  .rpg-head { display: block; padding: 24px 0 16px; }
  .rpg-eyebrow { font-size: 9px; }
  .creator-home .rpg-head h1 { font-size: clamp(22px, 6.6vw, 28px); }
  .rpg-lead { font-size: 12px; }
  .rpg-break { display: initial; }
  .creator-home .rpg-skip { display: none; }
  .rpg-frame { border-width: 3px; box-shadow: 4px 4px 0 #cdd5bf; margin: 0 -4px; }
  .rpg-stage { height: min(72vh, 560px); min-height: 400px; }
  .rpg-hud { top: 8px; left: 8px; right: 8px; }
  .rpg-area, .rpg-found { font-size: 12px; padding: 4px 8px 3px; }
  .rpg-hint { font-size: 11px; bottom: 8px; }
  .rpg-dialog { left: 6px; right: 6px; bottom: 6px; padding: 12px 12px 14px; gap: 10px; max-height: calc(100% - 52px); }
  .rpg-dialog__portrait { width: 40px; height: 40px; flex-basis: 40px; }
  .creator-home .rpg-dialog__text { font-size: 15px; }
  .rpg-choices { grid-template-columns: 1fr; }
  .creator-home .rpg-choice { font-size: 13px; min-height: 44px; }
  .rpg-choice img { width: 60px; height: 34px; flex-basis: 60px; }
  .rpg-warp { grid-template-columns: 1fr 1fr; border-width: 3px; margin: 0 -4px; }
  .creator-home .rpg-warp a:nth-of-type(3) { border-left: 0; }
  .creator-home .rpg-warp a:nth-of-type(n+3) { border-top: 2px dashed #d5d0b4; }
  .rpg-help { font-size: 10px; }
  .creator-home .home-section { padding: 32px 0 36px; }
  .creator-home .section-heading h2 { font-size: 20px; }
  .creator-home .app-grid { grid-template-columns: 1fr; gap: 21px; }
  .creator-home .app-visual { height: 204px; padding: 20px; }
  .creator-home .app-card__body { padding: 20px 22px; }
  .creator-home .card-title h3 { font-size: 20px; }
  .creator-home .app-card__body p { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rpg-area.is-new, .rpg-dialog__next { animation: none; }
  .creator-home *, .creator-home *::before, .creator-home *::after { transition: none !important; scroll-behavior: auto !important; }
}
