@namespace url("http://www.w3.org/1999/xhtml");

form dl {
    display: flex;
}
form dt::after {
    content: "：";
}
form dd {
    font-weight: bold;
    margin-left: 1em;
}

/*====================================
    投票箱
*/
[name="lot"] {
    width: 500px;
    height: 700px;
    color: transparent;
    border: none;
    background: url("./lottery-box");
    display: block;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

[name="lot"]:not([disabled]) {
    cursor: pointer;
}

[name="lot"][data-frame="1"] {
    background-position: 0 -700px;
}

[name="lot"][data-frame="2"] {
    background-position: 0 -1400px;
}

[name="lot"][data-frame="3"] {
    background-position: 0 -2100px;
}

[name="lot"][data-frame="4"] {
    background-position: 0 -2800px;
}

[name="lot"][disabled]:not([data-frame]) {
    background-position: -500px 0;
}

/*------------------------------------
    お題を引いた後
*/
[name="lot"]::before,
[name="lot"]::after {
    content: "";
    display: none;
    width: 100%;
    height: 100%;
    background: inherit;
    background-position: 0 -2800px;
    position: absolute;
    top: 0;
    left: 0;
    transition-property: opacity;
}

/*------------------------------------
    再度お題を引くとき
*/
[name="lot"][data-end]::before {
    display: block;
    transition-duration: 1s;
}

[name="lot"][data-end][data-relot]::before {
    display: block;
    opacity: 0;
}

/*------------------------------------
    最後のお題を引いた後
*/
[name="lot"][data-end-end]::after {
    display: block;
    transition-duration: 60s;
}

[name="lot"][data-end-end][data-disabled] {
    background-position: -500px -2800px;
}

[name="lot"][data-end-end][data-disabled]::after {
    opacity: 0;
}

/*====================================
    お題用紙
*/
[name="lot"] span,
form li {
    color: thistle;
    font-family: "851チカラヅヨク-かなA", fantasy;
    background: black;
    border: solid #84454A 6px;
    box-shadow: 0 -1px #B57184, 1px 0 #4A0C31, 0 1px #4A0C31, -1px 0 #4A0C31, /* 外側の上・右・下・左 */
            -1px -1px #535653, 0 0 0 1px #535653,                             /* 外側の四隅 */
            inset 1px 1px #4A0C31, inset -1px -1px #523C42,                   /* 内側の上左・下右 */
            0 -1px 0 1px #180000, 1px 0 0 1px #180000, 0 1px 0 1px #180000, -1px 0 0 1px #180000; /* 影 */
}

/*------------------------------------
    引いたお題
*/
[name="lot"] span {
    position: absolute;
    z-index: 1;
    width: 240px;
    height: 140px;
    bottom: 40px;
    left: 80px;
    padding: 10px;
    font-size: 2em;
    opacity: 0;
    transition: opacity 1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

[name="lot"] span:not([data-hidden]) {
    opacity: 1;
}

/*------------------------------------
    お題リスト
*/
form ol {
    list-style: none;
    display: flex;
	flex-wrap: wrap;
    padding: 0;
}

form li {
    margin: 0.5em;
    box-sizing: border-box;
    width: calc(100% / 3 - 1.5em);
    height: 6em;
    padding: 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 3s;
}

form li[data-hidden] {
    opacity: 0;
}


