:root {
    font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;
    color:#2a2328;
    background:#fff;
    color-scheme:light}
* {
    box-sizing:border-box}
body {
    margin:0}
.shell {
    max-width:450px;
    margin:auto;
    padding:8px 10px calc(14px + env(safe-area-inset-bottom))}
button {
    font:inherit;
    color:inherit;
    border:0;
    border-radius:8px;
    background:#f3f4f6;
    min-height:44px;
    padding:10px;
    touch-action:manipulation;
    cursor:pointer}
button:disabled {
    color:#807b80;
    cursor:default}
button:focus-visible,summary:focus-visible {
    outline:3px solid #9d526b;
    outline-offset:2px}
.companion {
    display:flex;
    gap:12px;
    align-items:center;
    min-height:92px}
.companion img {
    width:72px;
    height:88px;
    object-fit:cover;
    border-radius:12px;
    background:#eee}
.companion strong {
    font-size:13px}
.companion p {
    font-size:14px;
    line-height:1.5;
    margin:6px 0}
.scorebar {
    display:flex;
    justify-content:space-around;
    background:#f6f3f4;
    border-radius:8px;
    padding:9px 4px;
    margin-top:6px;
    font-size:14px}
.scorebar>span {
    display:flex;
    align-items:center;
    gap:7px}
.stone {
    display:block;
    border-radius:50%;
    border:1px solid #24272a;
    box-shadow:0 2px 2px #0002}
.black {
    background:radial-gradient(circle at 35% 30%,#60626a,#222329 70%)}
.white {
    background:radial-gradient(circle at 35% 30%,#fff,#e8e3e6 75%);
    border-color:#c3b8bd}
.scorebar .stone {
    width:18px;
    height:18px}
#status {
    font-size:13px;
    margin:9px 0;
    min-height:20px;
    text-align:center;
    font-weight:600}
.board {
    display:grid;
    grid-template-columns:repeat(8,minmax(0,1fr));
    gap:2px;
    padding:5px;
    border-radius:8px;
    background:#b49aa5;
    aspect-ratio:1;
    width:100%;
    overflow:hidden}
.cell {
    position:relative;
    min-width:0;
    min-height:0;
    border-radius:2px;
    padding:0;
    background:#eee3e8;
    aspect-ratio:1;
    display:grid;
    place-items:center}
.cell:disabled {
    opacity:1}
.cell .stone {
    width:79%;
    height:79%}
.cell.legal::after {
    content:"";
    width:18%;
    height:18%;
    background:#96627a;
    border-radius:50%}
.cell.selected {
    background:#d2b3c2;
    outline:2px solid #754058;
    outline-offset:-2px}
.cell.preview .stone {
    outline:3px solid #a55377;
    outline-offset:1px}
.cell.last::before {
    content:"";
    position:absolute;
    inset:3px;
    border:1px solid #9d526b;
    border-radius:3px}
.actions {
    display:flex;
    gap:8px;
    margin-top:10px}
.actions #place {
    flex:1}
.primary,#place:not(:disabled) {
    background:#9d526b;
    color:white}
.note {
    font-size:12px;
    line-height:1.5;
    color:#6e626a;
    margin:8px 0;
    text-align:center;
    min-height:18px}
dialog {
    width:calc(100% - 28px);
    max-width:420px;
    border:1px solid #e4dbe0;
    border-radius:12px;
    padding:20px;
    color:#2a2328;
    background:#fff;
    max-height:85dvh;
    overflow:auto}
dialog::backdrop {
    background:#2a232855}
dialog h2 {
    font-size:20px;
    margin:0 0 12px}
dialog p {
    font-size:14px;
    line-height:1.65}
dialog>button {
    width:100%;
    margin-top:8px}
.cast-options {
    display:grid;
    gap:8px;
    margin:12px 0}
.cast-option {
    display:flex;
    align-items:center;
    gap:12px;
    text-align:left;
    border:2px solid transparent}
.cast-option[aria-pressed=true] {
    border-color:#9d526b;
    background:#eef0f3}
.cast-option img {
    width:48px;
    height:58px;
    object-fit:cover;
    border-radius:6px}
.cast-option small {
    display:block;
    color:#6e626a;
    margin-top:4px}
summary {
    padding:14px 0;
    font-size:14px;
    cursor:pointer}
[hidden] {
    display:none!important}
.game-title-accessible {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0}
.move-help {
    font-size:11px;
    line-height:1.5;
    text-align:center;
    color:#6e626a;
    margin:0 0 7px;
    min-height:17px}
.actions #show-result {
    flex:1;
    background:#9d526b;
    color:#fff}
.scorebar>span {
    border-bottom:2px solid transparent;
    padding-bottom:3px}
.scorebar>span.is-turn {
    border-color:#9d526b;
    font-weight:700}
.cell.selected::after {
    width:58%;
    height:58%;
    background:#34343b;
    border:2px dashed #fff}
.cell.preview .stone {
    outline-style:dashed}
.cell.changed {
    background:#dcc6d0}
.cell.changed .stone {
    animation:settle .2s ease-out}
@keyframes settle {
    from {
    transform:scale(.83)}
to {
    transform:scale(1)}
}
@media(prefers-reduced-motion:reduce) {
    .cell.changed .stone {
    animation:none}
}
.companion>div {
    min-width:0}
.companion p,.note,.move-help {
    overflow-wrap:anywhere}
.actions button {
    min-width:0;
    font-size:13px}
.actions #menu {
    flex:0 0 104px}
#save-error {
    color:#8a3549}
@media(max-height:740px) {
    .companion {
    min-height:68px;
    gap:10px}
.companion img {
    width:56px;
    height:64px}
.companion p {
    font-size:13px;
    margin:4px 0}
.scorebar {
    padding:6px 4px;
    margin-top:4px}
#status {
    margin:6px 0}
.note {
    margin:4px 0}
.shell {
    padding-top:4px}
}
